home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / QuickTime / Programming Stuff / QuickTime 2.1 for Developers / Interfaces / PInterfaces / QuickTimeComponents.p < prev   
Encoding:
Text File  |  1995-08-07  |  147.1 KB  |  3,897 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        QuickTimeComponents.p
  3.  
  4.      Contains:    QuickTime interfaces
  5.  
  6.      Version:    
  7.  
  8.      DRI:        Jim Batson
  9.  
  10.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  11.                  All rights reserved.
  12.  
  13.      Warning:    *** APPLE INTERNAL USE ONLY ***
  14.                  This file may contain unreleased API's
  15.  
  16.      BuildInfo:    Built by:            QuickTime
  17.                  With Interfacer:    1.1d11  
  18.                  From:                QuickTimeComponents.i
  19.                      Revision:        0
  20.                      Dated:            08/07/95
  21.                      Last change by:    JB
  22.                      Last comment:    This is a fake header used so interfacer is happy.
  23.  
  24.      Bugs:        Report bugs to Radar component “System Interfaces”, “Latest”
  25.                  List the version information (from above) in the Problem Description.
  26.  
  27. }
  28.  
  29. {$IFC UNDEFINED UsingIncludes}
  30. {$SETC UsingIncludes := 0}
  31. {$ENDC}
  32.  
  33. {$IFC NOT UsingIncludes}
  34.  UNIT QuickTimeComponents;
  35.  INTERFACE
  36. {$ENDC}
  37.  
  38. {$IFC UNDEFINED __QUICKTIMECOMPONENTS__}
  39. {$SETC __QUICKTIMECOMPONENTS__ := 1}
  40.  
  41. {$I+}
  42. {$SETC QuickTimeComponentsIncludes := UsingIncludes}
  43. {$SETC UsingIncludes := 1}
  44.  
  45.  
  46. {$IFC UNDEFINED __COMPONENTS__}
  47. {$I Components.p}
  48. {$ENDC}
  49. {    Types.p                                                        }
  50. {        ConditionalMacros.p                                        }
  51. {    MixedMode.p                                                    }
  52.  
  53. {$IFC UNDEFINED __IMAGECOMPRESSION__}
  54. {$I ImageCompression.p}
  55. {$ENDC}
  56. {    Quickdraw.p                                                    }
  57. {        QuickdrawText.p                                            }
  58. {    QDOffscreen.p                                                }
  59. {        Errors.p                                                }
  60. {    Windows.p                                                    }
  61. {        Memory.p                                                }
  62. {        Events.p                                                }
  63. {            OSUtils.p                                            }
  64. {        Controls.p                                                }
  65. {            Menus.p                                                }
  66. {    StandardFile.p                                                }
  67. {        Dialogs.p                                                }
  68. {            TextEdit.p                                            }
  69. {        Files.p                                                    }
  70.  
  71. {$IFC UNDEFINED __MOVIES__}
  72. {$I Movies.p}
  73. {$ENDC}
  74. {    Aliases.p                                                    }
  75. {        AppleTalk.p                                                }
  76.  
  77. {$IFC UNDEFINED __VIDEO__}
  78. {$I Video.p}
  79. {$ENDC}
  80.  
  81. {$IFC UNDEFINED __SOUND__}
  82. {$I Sound.p}
  83. {$ENDC}
  84.  
  85. {$PUSH}
  86. {$ALIGN MAC68K}
  87. {$LibExport+}
  88.  
  89. CONST
  90.     clockComponentType            = 'clok';
  91.     systemTickClock                = 'tick';                        { subtype: 60ths since boot        }
  92.     systemSecondClock            = 'seco';                        { subtype: seconds since 1904        }
  93.     systemMillisecondClock        = 'mill';                        { subtype: 1000ths since boot        }
  94.     systemMicrosecondClock        = 'micr';
  95.  
  96.     kClockRateIsLinear            = 1;
  97.     kClockImplementsCallBacks    = 2;
  98.  
  99.  
  100. FUNCTION ClockGetTime(aClock: ComponentInstance; VAR out: TimeRecord): ComponentResult;
  101.     {$IFC NOT GENERATINGCFM}
  102.     INLINE $2F3C, $4, $1, $7000, $A82A;
  103.     {$ENDC}
  104. FUNCTION ClockNewCallBack(aClock: ComponentInstance; tb: TimeBase; callBackType: INTEGER): QTCallBack;
  105.     {$IFC NOT GENERATINGCFM}
  106.     INLINE $2F3C, $6, $2, $7000, $A82A;
  107.     {$ENDC}
  108. FUNCTION ClockDisposeCallBack(aClock: ComponentInstance; cb: QTCallBack): ComponentResult;
  109.     {$IFC NOT GENERATINGCFM}
  110.     INLINE $2F3C, $4, $3, $7000, $A82A;
  111.     {$ENDC}
  112. FUNCTION ClockCallMeWhen(aClock: ComponentInstance; cb: QTCallBack; param1: LONGINT; param2: LONGINT; param3: LONGINT): ComponentResult;
  113.     {$IFC NOT GENERATINGCFM}
  114.     INLINE $2F3C, $10, $4, $7000, $A82A;
  115.     {$ENDC}
  116. FUNCTION ClockCancelCallBack(aClock: ComponentInstance; cb: QTCallBack): ComponentResult;
  117.     {$IFC NOT GENERATINGCFM}
  118.     INLINE $2F3C, $4, $5, $7000, $A82A;
  119.     {$ENDC}
  120. FUNCTION ClockRateChanged(aClock: ComponentInstance; cb: QTCallBack): ComponentResult;
  121.     {$IFC NOT GENERATINGCFM}
  122.     INLINE $2F3C, $4, $6, $7000, $A82A;
  123.     {$ENDC}
  124. FUNCTION ClockTimeChanged(aClock: ComponentInstance; cb: QTCallBack): ComponentResult;
  125.     {$IFC NOT GENERATINGCFM}
  126.     INLINE $2F3C, $4, $7, $7000, $A82A;
  127.     {$ENDC}
  128. FUNCTION ClockSetTimeBase(aClock: ComponentInstance; tb: TimeBase): ComponentResult;
  129.     {$IFC NOT GENERATINGCFM}
  130.     INLINE $2F3C, $4, $8, $7000, $A82A;
  131.     {$ENDC}
  132. FUNCTION ClockStartStopChanged(aClock: ComponentInstance; cb: QTCallBack; startChanged: BOOLEAN; stopChanged: BOOLEAN): ComponentResult;
  133.     {$IFC NOT GENERATINGCFM}
  134.     INLINE $2F3C, $8, $9, $7000, $A82A;
  135.     {$ENDC}
  136. FUNCTION ClockGetRate(aClock: ComponentInstance; VAR rate: Fixed): ComponentResult;
  137.     {$IFC NOT GENERATINGCFM}
  138.     INLINE $2F3C, $4, $A, $7000, $A82A;
  139.     {$ENDC}
  140.  
  141. CONST
  142.     kClockGetTimeSelect            = $1;
  143.     kClockNewCallBackSelect        = $2;
  144.     kClockDisposeCallBackSelect    = $3;
  145.     kClockCallMeWhenSelect        = $4;
  146.     kClockCancelCallBackSelect    = $5;
  147.     kClockRateChangedSelect        = $6;
  148.     kClockTimeChangedSelect        = $7;
  149.     kClockSetTimeBaseSelect        = $8;
  150.     kClockStartStopChangedSelect = $9;
  151.     kClockGetRateSelect            = $A;
  152.  
  153. {
  154.     General Sequence Grab stuff
  155. }
  156.     
  157. TYPE
  158.     SeqGrabComponent = ComponentInstance;
  159.  
  160.     SGChannel = ComponentInstance;
  161.  
  162.  
  163. CONST
  164.     SeqGrabComponentType        = 'barg';
  165.     SeqGrabChannelType            = 'sgch';
  166.     SeqGrabPanelType            = 'sgpn';
  167.     SeqGrabCompressionPanelType    = 'cmpr';
  168.     SeqGrabSourcePanelType        = 'sour';
  169.  
  170.     seqGrabToDisk                = 1;
  171.     seqGrabToMemory                = 2;
  172.     seqGrabDontUseTempMemory    = 4;
  173.     seqGrabAppendToFile            = 8;
  174.     seqGrabDontAddMovieResource    = 16;
  175.     seqGrabDontMakeMovie        = 32;
  176.     seqGrabPreExtendFile        = 64;
  177.     seqGrabDataProcIsInterruptSafe = 128;
  178.     seqGrabDataProcDoesOverlappingReads = 256;
  179.  
  180.     
  181. TYPE
  182.     SeqGrabDataOutputEnum = LONGINT;
  183.  
  184.  
  185. CONST
  186.     seqGrabRecord                = 1;
  187.     seqGrabPreview                = 2;
  188.     seqGrabPlayDuringRecord        = 4;
  189.  
  190.     
  191. TYPE
  192.     SeqGrabUsageEnum = LONGINT;
  193.  
  194.  
  195. CONST
  196.     seqGrabHasBounds            = 1;
  197.     seqGrabHasVolume            = 2;
  198.     seqGrabHasDiscreteSamples    = 4;
  199.  
  200.     
  201. TYPE
  202.     SeqGrabChannelInfoEnum = LONGINT;
  203.  
  204.     SeqGrabFrameInfo = RECORD
  205.         frameOffset:            LONGINT;
  206.         frameTime:                LONGINT;
  207.         frameSize:                LONGINT;
  208.         frameChannel:            SGChannel;
  209.         frameRefCon:            LONGINT;
  210.     END;
  211.  
  212.     SeqGrabFrameInfoPtr = ^SeqGrabFrameInfo;
  213.  
  214.  
  215. CONST
  216.     grabPictOffScreen            = 1;
  217.     grabPictIgnoreClip            = 2;
  218.     grabPictCurrentImage        = 4;
  219.  
  220.     sgFlagControlledGrab        = 0+(1 * (2**(0)));
  221.  
  222. TYPE
  223.     SGDataProcPtr = ProcPtr;  { FUNCTION SGData(c: SGChannel; p: Ptr; len: LONGINT; VAR offset: LONGINT; chRefCon: LONGINT; time: TimeValue; writeType: INTEGER; refCon: LONGINT): OSErr; }
  224.     SGDataUPP = UniversalProcPtr;
  225.  
  226.     SGDeviceName = RECORD
  227.         name:                    Str63;
  228.         icon:                    Handle;
  229.         flags:                    LONGINT;
  230.         refCon:                    LONGINT;
  231.         reserved:                LONGINT;                                { zero}
  232.     END;
  233.  
  234.  
  235. CONST
  236.     sgDeviceNameFlagDeviceUnavailable = 0+(1 * (2**(0)));
  237.  
  238.  
  239. TYPE
  240.     SGDeviceListRecord = RECORD
  241.         count:                    INTEGER;
  242.         selectedIndex:            INTEGER;
  243.         reserved:                LONGINT;                                { zero}
  244.         entry:                    ARRAY [0..0] OF SGDeviceName;
  245.     END;
  246.  
  247.     SGDeviceListPtr = ^SGDeviceListRecord;
  248.     SGDeviceList = ^SGDeviceListPtr;
  249.  
  250.  
  251. CONST
  252.     sgDeviceListWithIcons        = 0+(1 * (2**(0)));
  253.     sgDeviceListDontCheckAvailability = 0+(1 * (2**(1)));
  254.  
  255.     seqGrabWriteAppend            = 0;
  256.     seqGrabWriteReserve            = 1;
  257.     seqGrabWriteFill            = 2;
  258.  
  259.     seqGrabUnpause                = 0;
  260.     seqGrabPause                = 1;
  261.     seqGrabPauseForMenu            = 3;
  262.  
  263.     channelFlagDontOpenResFile    = 2;
  264.     channelFlagHasDependency    = 4;
  265.  
  266. TYPE
  267.     SGModalFilterProcPtr = ProcPtr;  { FUNCTION SGModalFilter(theDialog: DialogPtr; VAR theEvent: EventRecord; VAR itemHit: INTEGER; refCon: LONGINT): BOOLEAN; }
  268.     SGModalFilterUPP = UniversalProcPtr;
  269.  
  270.  
  271. CONST
  272.     sgPanelFlagForPanel            = 1;
  273.  
  274.     seqGrabSettingsPreviewOnly    = 1;
  275.  
  276.  
  277. TYPE
  278.     SGOutputRecord = RECORD
  279.         data:                    ARRAY [0..0] OF LONGINT;
  280.     END;
  281.  
  282.     SGOutput = ^SGOutputRecord;
  283.  
  284.  
  285. CONST
  286.     channelPlayNormal            = 0;
  287.     channelPlayFast                = 1;
  288.     channelPlayHighQuality        = 2;
  289.     channelPlayAllData            = 4;
  290.  
  291.  
  292. FUNCTION SGInitialize(s: SeqGrabComponent): ComponentResult;
  293.     {$IFC NOT GENERATINGCFM}
  294.     INLINE $2F3C, 0, $1, $7000, $A82A;
  295.     {$ENDC}
  296. FUNCTION SGSetDataOutput(s: SeqGrabComponent; {CONST}VAR movieFile: FSSpec; whereFlags: LONGINT): ComponentResult;
  297.     {$IFC NOT GENERATINGCFM}
  298.     INLINE $2F3C, $8, $2, $7000, $A82A;
  299.     {$ENDC}
  300. FUNCTION SGGetDataOutput(s: SeqGrabComponent; VAR movieFile: FSSpec; VAR whereFlags: LONGINT): ComponentResult;
  301.     {$IFC NOT GENERATINGCFM}
  302.     INLINE $2F3C, $8, $3, $7000, $A82A;
  303.     {$ENDC}
  304. FUNCTION SGSetGWorld(s: SeqGrabComponent; gp: CGrafPtr; gd: GDHandle): ComponentResult;
  305.     {$IFC NOT GENERATINGCFM}
  306.     INLINE $2F3C, $8, $4, $7000, $A82A;
  307.     {$ENDC}
  308. FUNCTION SGGetGWorld(s: SeqGrabComponent; VAR gp: CGrafPtr; VAR gd: GDHandle): ComponentResult;
  309.     {$IFC NOT GENERATINGCFM}
  310.     INLINE $2F3C, $8, $5, $7000, $A82A;
  311.     {$ENDC}
  312. FUNCTION SGNewChannel(s: SeqGrabComponent; channelType: OSType; VAR ref: SGChannel): ComponentResult;
  313.     {$IFC NOT GENERATINGCFM}
  314.     INLINE $2F3C, $8, $6, $7000, $A82A;
  315.     {$ENDC}
  316. FUNCTION SGDisposeChannel(s: SeqGrabComponent; c: SGChannel): ComponentResult;
  317.     {$IFC NOT GENERATINGCFM}
  318.     INLINE $2F3C, $4, $7, $7000, $A82A;
  319.     {$ENDC}
  320. FUNCTION SGStartPreview(s: SeqGrabComponent): ComponentResult;
  321.     {$IFC NOT GENERATINGCFM}
  322.     INLINE $2F3C, 0, $10, $7000, $A82A;
  323.     {$ENDC}
  324. FUNCTION SGStartRecord(s: SeqGrabComponent): ComponentResult;
  325.     {$IFC NOT GENERATINGCFM}
  326.     INLINE $2F3C, 0, $11, $7000, $A82A;
  327.     {$ENDC}
  328. FUNCTION SGIdle(s: SeqGrabComponent): ComponentResult;
  329.     {$IFC NOT GENERATINGCFM}
  330.     INLINE $2F3C, 0, $12, $7000, $A82A;
  331.     {$ENDC}
  332. FUNCTION SGStop(s: SeqGrabComponent): ComponentResult;
  333.     {$IFC NOT GENERATINGCFM}
  334.     INLINE $2F3C, 0, $13, $7000, $A82A;
  335.     {$ENDC}
  336. FUNCTION SGPause(s: SeqGrabComponent; pause: ByteParameter): ComponentResult;
  337.     {$IFC NOT GENERATINGCFM}
  338.     INLINE $2F3C, $2, $14, $7000, $A82A;
  339.     {$ENDC}
  340. FUNCTION SGPrepare(s: SeqGrabComponent; prepareForPreview: BOOLEAN; prepareForRecord: BOOLEAN): ComponentResult;
  341.     {$IFC NOT GENERATINGCFM}
  342.     INLINE $2F3C, $4, $15, $7000, $A82A;
  343.     {$ENDC}
  344. FUNCTION SGRelease(s: SeqGrabComponent): ComponentResult;
  345.     {$IFC NOT GENERATINGCFM}
  346.     INLINE $2F3C, 0, $16, $7000, $A82A;
  347.     {$ENDC}
  348. FUNCTION SGGetMovie(s: SeqGrabComponent): Movie;
  349.     {$IFC NOT GENERATINGCFM}
  350.     INLINE $2F3C, 0, $17, $7000, $A82A;
  351.     {$ENDC}
  352. FUNCTION SGSetMaximumRecordTime(s: SeqGrabComponent; ticks: LONGINT): ComponentResult;
  353.     {$IFC NOT GENERATINGCFM}
  354.     INLINE $2F3C, $4, $18, $7000, $A82A;
  355.     {$ENDC}
  356. FUNCTION SGGetMaximumRecordTime(s: SeqGrabComponent; VAR ticks: LONGINT): ComponentResult;
  357.     {$IFC NOT GENERATINGCFM}
  358.     INLINE $2F3C, $4, $19, $7000, $A82A;
  359.     {$ENDC}
  360. FUNCTION SGGetStorageSpaceRemaining(s: SeqGrabComponent; VAR bytes: LONGINT): ComponentResult;
  361.     {$IFC NOT GENERATINGCFM}
  362.     INLINE $2F3C, $4, $1A, $7000, $A82A;
  363.     {$ENDC}
  364. FUNCTION SGGetTimeRemaining(s: SeqGrabComponent; VAR ticksLeft: LONGINT): ComponentResult;
  365.     {$IFC NOT GENERATINGCFM}
  366.     INLINE $2F3C, $4, $1B, $7000, $A82A;
  367.     {$ENDC}
  368. FUNCTION SGGrabPict(s: SeqGrabComponent; VAR p: PicHandle; {CONST}VAR bounds: Rect; offscreenDepth: INTEGER; grabPictFlags: LONGINT): ComponentResult;
  369.     {$IFC NOT GENERATINGCFM}
  370.     INLINE $2F3C, $E, $1C, $7000, $A82A;
  371.     {$ENDC}
  372. FUNCTION SGGetLastMovieResID(s: SeqGrabComponent; VAR resID: INTEGER): ComponentResult;
  373.     {$IFC NOT GENERATINGCFM}
  374.     INLINE $2F3C, $4, $1D, $7000, $A82A;
  375.     {$ENDC}
  376. FUNCTION SGSetFlags(s: SeqGrabComponent; sgFlags: LONGINT): ComponentResult;
  377.     {$IFC NOT GENERATINGCFM}
  378.     INLINE $2F3C, $4, $1E, $7000, $A82A;
  379.     {$ENDC}
  380. FUNCTION SGGetFlags(s: SeqGrabComponent; VAR sgFlags: LONGINT): ComponentResult;
  381.     {$IFC NOT GENERATINGCFM}
  382.     INLINE $2F3C, $4, $1F, $7000, $A82A;
  383.     {$ENDC}
  384. FUNCTION SGSetDataProc(s: SeqGrabComponent; proc: SGDataUPP; refCon: LONGINT): ComponentResult;
  385.     {$IFC NOT GENERATINGCFM}
  386.     INLINE $2F3C, $8, $20, $7000, $A82A;
  387.     {$ENDC}
  388. FUNCTION SGNewChannelFromComponent(s: SeqGrabComponent; VAR newChannel: SGChannel; sgChannelComponent: Component): ComponentResult;
  389.     {$IFC NOT GENERATINGCFM}
  390.     INLINE $2F3C, $8, $21, $7000, $A82A;
  391.     {$ENDC}
  392. FUNCTION SGDisposeDeviceList(s: SeqGrabComponent; list: SGDeviceList): ComponentResult;
  393.     {$IFC NOT GENERATINGCFM}
  394.     INLINE $2F3C, $4, $22, $7000, $A82A;
  395.     {$ENDC}
  396. FUNCTION SGAppendDeviceListToMenu(s: SeqGrabComponent; list: SGDeviceList; mh: MenuHandle): ComponentResult;
  397.     {$IFC NOT GENERATINGCFM}
  398.     INLINE $2F3C, $8, $23, $7000, $A82A;
  399.     {$ENDC}
  400. FUNCTION SGSetSettings(s: SeqGrabComponent; ud: UserData; flags: LONGINT): ComponentResult;
  401.     {$IFC NOT GENERATINGCFM}
  402.     INLINE $2F3C, $8, $24, $7000, $A82A;
  403.     {$ENDC}
  404. FUNCTION SGGetSettings(s: SeqGrabComponent; VAR ud: UserData; flags: LONGINT): ComponentResult;
  405.     {$IFC NOT GENERATINGCFM}
  406.     INLINE $2F3C, $8, $25, $7000, $A82A;
  407.     {$ENDC}
  408. FUNCTION SGGetIndChannel(s: SeqGrabComponent; index: INTEGER; VAR ref: SGChannel; VAR chanType: OSType): ComponentResult;
  409.     {$IFC NOT GENERATINGCFM}
  410.     INLINE $2F3C, $A, $26, $7000, $A82A;
  411.     {$ENDC}
  412. FUNCTION SGUpdate(s: SeqGrabComponent; updateRgn: RgnHandle): ComponentResult;
  413.     {$IFC NOT GENERATINGCFM}
  414.     INLINE $2F3C, $4, $27, $7000, $A82A;
  415.     {$ENDC}
  416. FUNCTION SGGetPause(s: SeqGrabComponent; VAR paused: Byte): ComponentResult;
  417.     {$IFC NOT GENERATINGCFM}
  418.     INLINE $2F3C, $4, $28, $7000, $A82A;
  419.     {$ENDC}
  420. FUNCTION SGSettingsDialog(s: SeqGrabComponent; c: SGChannel; numPanels: INTEGER; VAR panelList: Component; flags: LONGINT; proc: SGModalFilterUPP; procRefNum: LONGINT): ComponentResult;
  421.     {$IFC NOT GENERATINGCFM}
  422.     INLINE $2F3C, $16, $29, $7000, $A82A;
  423.     {$ENDC}
  424. FUNCTION SGGetAlignmentProc(s: SeqGrabComponent; alignmentProc: ICMAlignmentProcRecordPtr): ComponentResult;
  425.     {$IFC NOT GENERATINGCFM}
  426.     INLINE $2F3C, $4, $2A, $7000, $A82A;
  427.     {$ENDC}
  428. FUNCTION SGSetChannelSettings(s: SeqGrabComponent; c: SGChannel; ud: UserData; flags: LONGINT): ComponentResult;
  429.     {$IFC NOT GENERATINGCFM}
  430.     INLINE $2F3C, $C, $2B, $7000, $A82A;
  431.     {$ENDC}
  432. FUNCTION SGGetChannelSettings(s: SeqGrabComponent; c: SGChannel; VAR ud: UserData; flags: LONGINT): ComponentResult;
  433.     {$IFC NOT GENERATINGCFM}
  434.     INLINE $2F3C, $C, $2C, $7000, $A82A;
  435.     {$ENDC}
  436. FUNCTION SGGetMode(s: SeqGrabComponent; VAR previewMode: BOOLEAN; VAR recordMode: BOOLEAN): ComponentResult;
  437.     {$IFC NOT GENERATINGCFM}
  438.     INLINE $2F3C, $8, $2D, $7000, $A82A;
  439.     {$ENDC}
  440. FUNCTION SGSetDataRef(s: SeqGrabComponent; dataRef: Handle; dataRefType: OSType; whereFlags: LONGINT): ComponentResult;
  441.     {$IFC NOT GENERATINGCFM}
  442.     INLINE $2F3C, $C, $2E, $7000, $A82A;
  443.     {$ENDC}
  444. FUNCTION SGGetDataRef(s: SeqGrabComponent; VAR dataRef: Handle; VAR dataRefType: OSType; VAR whereFlags: LONGINT): ComponentResult;
  445.     {$IFC NOT GENERATINGCFM}
  446.     INLINE $2F3C, $C, $2F, $7000, $A82A;
  447.     {$ENDC}
  448. FUNCTION SGNewOutput(s: SeqGrabComponent; dataRef: Handle; dataRefType: OSType; whereFlags: LONGINT; VAR output: SGOutput): ComponentResult;
  449.     {$IFC NOT GENERATINGCFM}
  450.     INLINE $2F3C, $10, $30, $7000, $A82A;
  451.     {$ENDC}
  452. FUNCTION SGDisposeOutput(s: SeqGrabComponent; output: SGOutput): ComponentResult;
  453.     {$IFC NOT GENERATINGCFM}
  454.     INLINE $2F3C, $4, $31, $7000, $A82A;
  455.     {$ENDC}
  456. FUNCTION SGSetOutputFlags(s: SeqGrabComponent; output: SGOutput; whereFlags: LONGINT): ComponentResult;
  457.     {$IFC NOT GENERATINGCFM}
  458.     INLINE $2F3C, $8, $32, $7000, $A82A;
  459.     {$ENDC}
  460. FUNCTION SGSetChannelOutput(s: SeqGrabComponent; c: SGChannel; output: SGOutput): ComponentResult;
  461.     {$IFC NOT GENERATINGCFM}
  462.     INLINE $2F3C, $8, $33, $7000, $A82A;
  463.     {$ENDC}
  464. FUNCTION SGGetDataOutputStorageSpaceRemaining(s: SeqGrabComponent; output: SGOutput; VAR space: LONGINT): ComponentResult;
  465.     {$IFC NOT GENERATINGCFM}
  466.     INLINE $2F3C, $8, $34, $7000, $A82A;
  467.     {$ENDC}
  468. {
  469.     calls from Channel to seqGrab
  470. }
  471. FUNCTION SGWriteMovieData(s: SeqGrabComponent; c: SGChannel; p: Ptr; len: LONGINT; VAR offset: LONGINT): ComponentResult;
  472.     {$IFC NOT GENERATINGCFM}
  473.     INLINE $2F3C, $10, $100, $7000, $A82A;
  474.     {$ENDC}
  475. FUNCTION SGAddFrameReference(s: SeqGrabComponent; frameInfo: SeqGrabFrameInfoPtr): ComponentResult;
  476.     {$IFC NOT GENERATINGCFM}
  477.     INLINE $2F3C, $4, $101, $7000, $A82A;
  478.     {$ENDC}
  479. FUNCTION SGGetNextFrameReference(s: SeqGrabComponent; frameInfo: SeqGrabFrameInfoPtr; VAR frameDuration: TimeValue; VAR frameNumber: LONGINT): ComponentResult;
  480.     {$IFC NOT GENERATINGCFM}
  481.     INLINE $2F3C, $C, $102, $7000, $A82A;
  482.     {$ENDC}
  483. FUNCTION SGGetTimeBase(s: SeqGrabComponent; VAR tb: TimeBase): ComponentResult;
  484.     {$IFC NOT GENERATINGCFM}
  485.     INLINE $2F3C, $4, $103, $7000, $A82A;
  486.     {$ENDC}
  487. FUNCTION SGSortDeviceList(s: SeqGrabComponent; list: SGDeviceList): ComponentResult;
  488.     {$IFC NOT GENERATINGCFM}
  489.     INLINE $2F3C, $4, $104, $7000, $A82A;
  490.     {$ENDC}
  491. FUNCTION SGAddMovieData(s: SeqGrabComponent; c: SGChannel; p: Ptr; len: LONGINT; VAR offset: LONGINT; chRefCon: LONGINT; time: TimeValue; writeType: INTEGER): ComponentResult;
  492.     {$IFC NOT GENERATINGCFM}
  493.     INLINE $2F3C, $1A, $105, $7000, $A82A;
  494.     {$ENDC}
  495. FUNCTION SGChangedSource(s: SeqGrabComponent; c: SGChannel): ComponentResult;
  496.     {$IFC NOT GENERATINGCFM}
  497.     INLINE $2F3C, $4, $106, $7000, $A82A;
  498.     {$ENDC}
  499. {** Sequence Grab CHANNEL Component Stuff **}
  500. FUNCTION SGSetChannelUsage(c: SGChannel; usage: LONGINT): ComponentResult;
  501.     {$IFC NOT GENERATINGCFM}
  502.     INLINE $2F3C, $4, $80, $7000, $A82A;
  503.     {$ENDC}
  504. FUNCTION SGGetChannelUsage(c: SGChannel; VAR usage: LONGINT): ComponentResult;
  505.     {$IFC NOT GENERATINGCFM}
  506.     INLINE $2F3C, $4, $81, $7000, $A82A;
  507.     {$ENDC}
  508. FUNCTION SGSetChannelBounds(c: SGChannel; {CONST}VAR bounds: Rect): ComponentResult;
  509.     {$IFC NOT GENERATINGCFM}
  510.     INLINE $2F3C, $4, $82, $7000, $A82A;
  511.     {$ENDC}
  512. FUNCTION SGGetChannelBounds(c: SGChannel; VAR bounds: Rect): ComponentResult;
  513.     {$IFC NOT GENERATINGCFM}
  514.     INLINE $2F3C, $4, $83, $7000, $A82A;
  515.     {$ENDC}
  516. FUNCTION SGSetChannelVolume(c: SGChannel; volume: INTEGER): ComponentResult;
  517.     {$IFC NOT GENERATINGCFM}
  518.     INLINE $2F3C, $2, $84, $7000, $A82A;
  519.     {$ENDC}
  520. FUNCTION SGGetChannelVolume(c: SGChannel; VAR volume: INTEGER): ComponentResult;
  521.     {$IFC NOT GENERATINGCFM}
  522.     INLINE $2F3C, $4, $85, $7000, $A82A;
  523.     {$ENDC}
  524. FUNCTION SGGetChannelInfo(c: SGChannel; VAR channelInfo: LONGINT): ComponentResult;
  525.     {$IFC NOT GENERATINGCFM}
  526.     INLINE $2F3C, $4, $86, $7000, $A82A;
  527.     {$ENDC}
  528. FUNCTION SGSetChannelPlayFlags(c: SGChannel; playFlags: LONGINT): ComponentResult;
  529.     {$IFC NOT GENERATINGCFM}
  530.     INLINE $2F3C, $4, $87, $7000, $A82A;
  531.     {$ENDC}
  532. FUNCTION SGGetChannelPlayFlags(c: SGChannel; VAR playFlags: LONGINT): ComponentResult;
  533.     {$IFC NOT GENERATINGCFM}
  534.     INLINE $2F3C, $4, $88, $7000, $A82A;
  535.     {$ENDC}
  536. FUNCTION SGSetChannelMaxFrames(c: SGChannel; frameCount: LONGINT): ComponentResult;
  537.     {$IFC NOT GENERATINGCFM}
  538.     INLINE $2F3C, $4, $89, $7000, $A82A;
  539.     {$ENDC}
  540. FUNCTION SGGetChannelMaxFrames(c: SGChannel; VAR frameCount: LONGINT): ComponentResult;
  541.     {$IFC NOT GENERATINGCFM}
  542.     INLINE $2F3C, $4, $8A, $7000, $A82A;
  543.     {$ENDC}
  544. FUNCTION SGSetChannelRefCon(c: SGChannel; refCon: LONGINT): ComponentResult;
  545.     {$IFC NOT GENERATINGCFM}
  546.     INLINE $2F3C, $4, $8B, $7000, $A82A;
  547.     {$ENDC}
  548. FUNCTION SGSetChannelClip(c: SGChannel; theClip: RgnHandle): ComponentResult;
  549.     {$IFC NOT GENERATINGCFM}
  550.     INLINE $2F3C, $4, $8C, $7000, $A82A;
  551.     {$ENDC}
  552. FUNCTION SGGetChannelClip(c: SGChannel; VAR theClip: RgnHandle): ComponentResult;
  553.     {$IFC NOT GENERATINGCFM}
  554.     INLINE $2F3C, $4, $8D, $7000, $A82A;
  555.     {$ENDC}
  556. FUNCTION SGGetChannelSampleDescription(c: SGChannel; sampleDesc: Handle): ComponentResult;
  557.     {$IFC NOT GENERATINGCFM}
  558.     INLINE $2F3C, $4, $8E, $7000, $A82A;
  559.     {$ENDC}
  560. FUNCTION SGGetChannelDeviceList(c: SGChannel; selectionFlags: LONGINT; VAR list: SGDeviceList): ComponentResult;
  561.     {$IFC NOT GENERATINGCFM}
  562.     INLINE $2F3C, $8, $8F, $7000, $A82A;
  563.     {$ENDC}
  564. FUNCTION SGSetChannelDevice(c: SGChannel; name: StringPtr): ComponentResult;
  565.     {$IFC NOT GENERATINGCFM}
  566.     INLINE $2F3C, $4, $90, $7000, $A82A;
  567.     {$ENDC}
  568. FUNCTION SGSetChannelMatrix(c: SGChannel; {CONST}VAR m: MatrixRecord): ComponentResult;
  569.     {$IFC NOT GENERATINGCFM}
  570.     INLINE $2F3C, $4, $91, $7000, $A82A;
  571.     {$ENDC}
  572. FUNCTION SGGetChannelMatrix(c: SGChannel; VAR m: MatrixRecord): ComponentResult;
  573.     {$IFC NOT GENERATINGCFM}
  574.     INLINE $2F3C, $4, $92, $7000, $A82A;
  575.     {$ENDC}
  576. FUNCTION SGGetChannelTimeScale(c: SGChannel; VAR scale: TimeScale): ComponentResult;
  577.     {$IFC NOT GENERATINGCFM}
  578.     INLINE $2F3C, $4, $93, $7000, $A82A;
  579.     {$ENDC}
  580. FUNCTION SGChannelPutPicture(c: SGChannel): ComponentResult;
  581.     {$IFC NOT GENERATINGCFM}
  582.     INLINE $2F3C, 0, $94, $7000, $A82A;
  583.     {$ENDC}
  584. FUNCTION SGChannelSetRequestedDataRate(c: SGChannel; bytesPerSecond: LONGINT): ComponentResult;
  585.     {$IFC NOT GENERATINGCFM}
  586.     INLINE $2F3C, $4, $95, $7000, $A82A;
  587.     {$ENDC}
  588. FUNCTION SGChannelGetRequestedDataRate(c: SGChannel; VAR bytesPerSecond: LONGINT): ComponentResult;
  589.     {$IFC NOT GENERATINGCFM}
  590.     INLINE $2F3C, $4, $96, $7000, $A82A;
  591.     {$ENDC}
  592. FUNCTION SGChannelSetDataSourceName(c: SGChannel; name: ConstStr255Param; scriptTag: ScriptCode): ComponentResult;
  593.     {$IFC NOT GENERATINGCFM}
  594.     INLINE $2F3C, $6, $97, $7000, $A82A;
  595.     {$ENDC}
  596. FUNCTION SGChannelGetDataSourceName(c: SGChannel; VAR name: Str255; VAR scriptTag: ScriptCode): ComponentResult;
  597.     {$IFC NOT GENERATINGCFM}
  598.     INLINE $2F3C, $8, $98, $7000, $A82A;
  599.     {$ENDC}
  600. {
  601.     calls from seqGrab to Channel
  602. }
  603. FUNCTION SGInitChannel(c: SGChannel; owner: SeqGrabComponent): ComponentResult;
  604.     {$IFC NOT GENERATINGCFM}
  605.     INLINE $2F3C, $4, $180, $7000, $A82A;
  606.     {$ENDC}
  607. FUNCTION SGWriteSamples(c: SGChannel; m: Movie; theFile: AliasHandle): ComponentResult;
  608.     {$IFC NOT GENERATINGCFM}
  609.     INLINE $2F3C, $8, $181, $7000, $A82A;
  610.     {$ENDC}
  611. FUNCTION SGGetDataRate(c: SGChannel; VAR bytesPerSecond: LONGINT): ComponentResult;
  612.     {$IFC NOT GENERATINGCFM}
  613.     INLINE $2F3C, $4, $182, $7000, $A82A;
  614.     {$ENDC}
  615. FUNCTION SGAlignChannelRect(c: SGChannel; VAR r: Rect): ComponentResult;
  616.     {$IFC NOT GENERATINGCFM}
  617.     INLINE $2F3C, $4, $183, $7000, $A82A;
  618.     {$ENDC}
  619. {
  620.     Dorky dialog panel calls
  621. }
  622. FUNCTION SGPanelGetDitl(s: SeqGrabComponent; VAR ditl: Handle): ComponentResult;
  623.     {$IFC NOT GENERATINGCFM}
  624.     INLINE $2F3C, $4, $200, $7000, $A82A;
  625.     {$ENDC}
  626. FUNCTION SGPanelGetTitle(s: SeqGrabComponent; VAR title: Str255): ComponentResult;
  627.     {$IFC NOT GENERATINGCFM}
  628.     INLINE $2F3C, $4, $201, $7000, $A82A;
  629.     {$ENDC}
  630. FUNCTION SGPanelCanRun(s: SeqGrabComponent; c: SGChannel): ComponentResult;
  631.     {$IFC NOT GENERATINGCFM}
  632.     INLINE $2F3C, $4, $202, $7000, $A82A;
  633.     {$ENDC}
  634. FUNCTION SGPanelInstall(s: SeqGrabComponent; c: SGChannel; d: DialogPtr; itemOffset: INTEGER): ComponentResult;
  635.     {$IFC NOT GENERATINGCFM}
  636.     INLINE $2F3C, $A, $203, $7000, $A82A;
  637.     {$ENDC}
  638. FUNCTION SGPanelEvent(s: SeqGrabComponent; c: SGChannel; d: DialogPtr; itemOffset: INTEGER; VAR theEvent: EventRecord; VAR itemHit: INTEGER; VAR handled: BOOLEAN): ComponentResult;
  639.     {$IFC NOT GENERATINGCFM}
  640.     INLINE $2F3C, $16, $204, $7000, $A82A;
  641.     {$ENDC}
  642. FUNCTION SGPanelItem(s: SeqGrabComponent; c: SGChannel; d: DialogPtr; itemOffset: INTEGER; itemNum: INTEGER): ComponentResult;
  643.     {$IFC NOT GENERATINGCFM}
  644.     INLINE $2F3C, $C, $205, $7000, $A82A;
  645.     {$ENDC}
  646. FUNCTION SGPanelRemove(s: SeqGrabComponent; c: SGChannel; d: DialogPtr; itemOffset: INTEGER): ComponentResult;
  647.     {$IFC NOT GENERATINGCFM}
  648.     INLINE $2F3C, $A, $206, $7000, $A82A;
  649.     {$ENDC}
  650. FUNCTION SGPanelSetGrabber(s: SeqGrabComponent; sg: SeqGrabComponent): ComponentResult;
  651.     {$IFC NOT GENERATINGCFM}
  652.     INLINE $2F3C, $4, $207, $7000, $A82A;
  653.     {$ENDC}
  654. FUNCTION SGPanelSetResFile(s: SeqGrabComponent; resRef: INTEGER): ComponentResult;
  655.     {$IFC NOT GENERATINGCFM}
  656.     INLINE $2F3C, $2, $208, $7000, $A82A;
  657.     {$ENDC}
  658. FUNCTION SGPanelGetSettings(s: SeqGrabComponent; c: SGChannel; VAR ud: UserData; flags: LONGINT): ComponentResult;
  659.     {$IFC NOT GENERATINGCFM}
  660.     INLINE $2F3C, $C, $209, $7000, $A82A;
  661.     {$ENDC}
  662. FUNCTION SGPanelSetSettings(s: SeqGrabComponent; c: SGChannel; ud: UserData; flags: LONGINT): ComponentResult;
  663.     {$IFC NOT GENERATINGCFM}
  664.     INLINE $2F3C, $C, $20A, $7000, $A82A;
  665.     {$ENDC}
  666. FUNCTION SGPanelValidateInput(s: SeqGrabComponent; VAR ok: BOOLEAN): ComponentResult;
  667.     {$IFC NOT GENERATINGCFM}
  668.     INLINE $2F3C, $4, $20B, $7000, $A82A;
  669.     {$ENDC}
  670. FUNCTION SGPanelSetEventFilter(s: SeqGrabComponent; proc: SGModalFilterUPP; refCon: LONGINT): ComponentResult;
  671.     {$IFC NOT GENERATINGCFM}
  672.     INLINE $2F3C, $8, $20C, $7000, $A82A;
  673.     {$ENDC}
  674. {** Sequence Grab VIDEO CHANNEL Component Stuff **}
  675. {
  676.     Video stuff
  677. }
  678.  
  679. TYPE
  680.     SGCompressInfo = RECORD
  681.         buffer:                    Ptr;
  682.         bufferSize:                LONGINT;
  683.         similarity:                SInt8;
  684.         reserved:                SInt8;
  685.     END;
  686.  
  687.     SGGrabProcPtr = ProcPtr;  { FUNCTION SGGrab(c: SGChannel; bufferNum: INTEGER; refCon: LONGINT): ComponentResult; }
  688.     SGGrabCompleteProcPtr = ProcPtr;  { FUNCTION SGGrabComplete(c: SGChannel; bufferNum: INTEGER; VAR done: BOOLEAN; refCon: LONGINT): ComponentResult; }
  689.     SGDisplayProcPtr = ProcPtr;  { FUNCTION SGDisplay(c: SGChannel; bufferNum: INTEGER; VAR mp: MatrixRecord; clipRgn: RgnHandle; refCon: LONGINT): ComponentResult; }
  690.     SGCompressProcPtr = ProcPtr;  { FUNCTION SGCompress(c: SGChannel; bufferNum: INTEGER; refCon: LONGINT): ComponentResult; }
  691.     SGCompressCompleteProcPtr = ProcPtr;  { FUNCTION SGCompressComplete(c: SGChannel; bufferNum: INTEGER; VAR done: BOOLEAN; VAR ci: SGCompressInfo; refCon: LONGINT): ComponentResult; }
  692.     SGAddFrameProcPtr = ProcPtr;  { FUNCTION SGAddFrame(c: SGChannel; bufferNum: INTEGER; atTime: TimeValue; scale: TimeScale; (CONST)VAR ci: SGCompressInfo; refCon: LONGINT): ComponentResult; }
  693.     SGTransferFrameProcPtr = ProcPtr;  { FUNCTION SGTransferFrame(c: SGChannel; bufferNum: INTEGER; VAR mp: MatrixRecord; clipRgn: RgnHandle; refCon: LONGINT): ComponentResult; }
  694.     SGGrabCompressCompleteProcPtr = ProcPtr;  { FUNCTION SGGrabCompressComplete(c: SGChannel; VAR done: BOOLEAN; VAR ci: SGCompressInfo; VAR t: TimeRecord; refCon: LONGINT): ComponentResult; }
  695.     SGDisplayCompressProcPtr = ProcPtr;  { FUNCTION SGDisplayCompress(c: SGChannel; dataPtr: Ptr; desc: ImageDescriptionHandle; VAR mp: MatrixRecord; clipRgn: RgnHandle; refCon: LONGINT): ComponentResult; }
  696.     SGGrabUPP = UniversalProcPtr;
  697.     SGGrabCompleteUPP = UniversalProcPtr;
  698.     SGDisplayUPP = UniversalProcPtr;
  699.     SGCompressUPP = UniversalProcPtr;
  700.     SGCompressCompleteUPP = UniversalProcPtr;
  701.     SGAddFrameUPP = UniversalProcPtr;
  702.     SGTransferFrameUPP = UniversalProcPtr;
  703.     SGGrabCompressCompleteUPP = UniversalProcPtr;
  704.     SGDisplayCompressUPP = UniversalProcPtr;
  705.  
  706.     VideoBottles = RECORD
  707.         procCount:                INTEGER;
  708.         grabProc:                SGGrabUPP;
  709.         grabCompleteProc:        SGGrabCompleteUPP;
  710.         displayProc:            SGDisplayUPP;
  711.         compressProc:            SGCompressUPP;
  712.         compressCompleteProc:    SGCompressCompleteUPP;
  713.         addFrameProc:            SGAddFrameUPP;
  714.         transferFrameProc:        SGTransferFrameUPP;
  715.         grabCompressCompleteProc: SGGrabCompressCompleteUPP;
  716.         displayCompressProc:    SGDisplayCompressUPP;
  717.     END;
  718.  
  719.  
  720. FUNCTION SGGetSrcVideoBounds(c: SGChannel; VAR r: Rect): ComponentResult;
  721.     {$IFC NOT GENERATINGCFM}
  722.     INLINE $2F3C, $4, $100, $7000, $A82A;
  723.     {$ENDC}
  724. FUNCTION SGSetVideoRect(c: SGChannel; {CONST}VAR r: Rect): ComponentResult;
  725.     {$IFC NOT GENERATINGCFM}
  726.     INLINE $2F3C, $4, $101, $7000, $A82A;
  727.     {$ENDC}
  728. FUNCTION SGGetVideoRect(c: SGChannel; VAR r: Rect): ComponentResult;
  729.     {$IFC NOT GENERATINGCFM}
  730.     INLINE $2F3C, $4, $102, $7000, $A82A;
  731.     {$ENDC}
  732. FUNCTION SGGetVideoCompressorType(c: SGChannel; VAR compressorType: OSType): ComponentResult;
  733.     {$IFC NOT GENERATINGCFM}
  734.     INLINE $2F3C, $4, $103, $7000, $A82A;
  735.     {$ENDC}
  736. FUNCTION SGSetVideoCompressorType(c: SGChannel; compressorType: OSType): ComponentResult;
  737.     {$IFC NOT GENERATINGCFM}
  738.     INLINE $2F3C, $4, $104, $7000, $A82A;
  739.     {$ENDC}
  740. FUNCTION SGSetVideoCompressor(c: SGChannel; depth: INTEGER; compressor: CompressorComponent; spatialQuality: CodecQ; temporalQuality: CodecQ; keyFrameRate: LONGINT): ComponentResult;
  741.     {$IFC NOT GENERATINGCFM}
  742.     INLINE $2F3C, $12, $105, $7000, $A82A;
  743.     {$ENDC}
  744. FUNCTION SGGetVideoCompressor(c: SGChannel; VAR depth: INTEGER; VAR compressor: CompressorComponent; VAR spatialQuality: CodecQ; VAR temporalQuality: CodecQ; VAR keyFrameRate: LONGINT): ComponentResult;
  745.     {$IFC NOT GENERATINGCFM}
  746.     INLINE $2F3C, $14, $106, $7000, $A82A;
  747.     {$ENDC}
  748. FUNCTION SGGetVideoDigitizerComponent(c: SGChannel): ComponentInstance;
  749.     {$IFC NOT GENERATINGCFM}
  750.     INLINE $2F3C, 0, $107, $7000, $A82A;
  751.     {$ENDC}
  752. FUNCTION SGSetVideoDigitizerComponent(c: SGChannel; vdig: ComponentInstance): ComponentResult;
  753.     {$IFC NOT GENERATINGCFM}
  754.     INLINE $2F3C, $4, $108, $7000, $A82A;
  755.     {$ENDC}
  756. FUNCTION SGVideoDigitizerChanged(c: SGChannel): ComponentResult;
  757.     {$IFC NOT GENERATINGCFM}
  758.     INLINE $2F3C, 0, $109, $7000, $A82A;
  759.     {$ENDC}
  760. FUNCTION SGSetVideoBottlenecks(c: SGChannel; VAR vb: VideoBottles): ComponentResult;
  761.     {$IFC NOT GENERATINGCFM}
  762.     INLINE $2F3C, $4, $10A, $7000, $A82A;
  763.     {$ENDC}
  764. FUNCTION SGGetVideoBottlenecks(c: SGChannel; VAR vb: VideoBottles): ComponentResult;
  765.     {$IFC NOT GENERATINGCFM}
  766.     INLINE $2F3C, $4, $10B, $7000, $A82A;
  767.     {$ENDC}
  768. FUNCTION SGGrabFrame(c: SGChannel; bufferNum: INTEGER): ComponentResult;
  769.     {$IFC NOT GENERATINGCFM}
  770.     INLINE $2F3C, $2, $10C, $7000, $A82A;
  771.     {$ENDC}
  772. FUNCTION SGGrabFrameComplete(c: SGChannel; bufferNum: INTEGER; VAR done: BOOLEAN): ComponentResult;
  773.     {$IFC NOT GENERATINGCFM}
  774.     INLINE $2F3C, $6, $10D, $7000, $A82A;
  775.     {$ENDC}
  776. FUNCTION SGDisplayFrame(c: SGChannel; bufferNum: INTEGER; {CONST}VAR mp: MatrixRecord; clipRgn: RgnHandle): ComponentResult;
  777.     {$IFC NOT GENERATINGCFM}
  778.     INLINE $2F3C, $A, $10E, $7000, $A82A;
  779.     {$ENDC}
  780. FUNCTION SGCompressFrame(c: SGChannel; bufferNum: INTEGER): ComponentResult;
  781.     {$IFC NOT GENERATINGCFM}
  782.     INLINE $2F3C, $2, $10F, $7000, $A82A;
  783.     {$ENDC}
  784. FUNCTION SGCompressFrameComplete(c: SGChannel; bufferNum: INTEGER; VAR done: BOOLEAN; VAR ci: SGCompressInfo): ComponentResult;
  785.     {$IFC NOT GENERATINGCFM}
  786.     INLINE $2F3C, $A, $110, $7000, $A82A;
  787.     {$ENDC}
  788. FUNCTION SGAddFrame(c: SGChannel; bufferNum: INTEGER; atTime: TimeValue; scale: TimeScale; {CONST}VAR ci: SGCompressInfo): ComponentResult;
  789.     {$IFC NOT GENERATINGCFM}
  790.     INLINE $2F3C, $E, $111, $7000, $A82A;
  791.     {$ENDC}
  792. FUNCTION SGTransferFrameForCompress(c: SGChannel; bufferNum: INTEGER; {CONST}VAR mp: MatrixRecord; clipRgn: RgnHandle): ComponentResult;
  793.     {$IFC NOT GENERATINGCFM}
  794.     INLINE $2F3C, $A, $112, $7000, $A82A;
  795.     {$ENDC}
  796. FUNCTION SGSetCompressBuffer(c: SGChannel; depth: INTEGER; {CONST}VAR compressSize: Rect): ComponentResult;
  797.     {$IFC NOT GENERATINGCFM}
  798.     INLINE $2F3C, $6, $113, $7000, $A82A;
  799.     {$ENDC}
  800. FUNCTION SGGetCompressBuffer(c: SGChannel; VAR depth: INTEGER; VAR compressSize: Rect): ComponentResult;
  801.     {$IFC NOT GENERATINGCFM}
  802.     INLINE $2F3C, $8, $114, $7000, $A82A;
  803.     {$ENDC}
  804. FUNCTION SGGetBufferInfo(c: SGChannel; bufferNum: INTEGER; VAR bufferPM: PixMapHandle; VAR bufferRect: Rect; VAR compressBuffer: GWorldPtr; VAR compressBufferRect: Rect): ComponentResult;
  805.     {$IFC NOT GENERATINGCFM}
  806.     INLINE $2F3C, $12, $115, $7000, $A82A;
  807.     {$ENDC}
  808. FUNCTION SGSetUseScreenBuffer(c: SGChannel; useScreenBuffer: BOOLEAN): ComponentResult;
  809.     {$IFC NOT GENERATINGCFM}
  810.     INLINE $2F3C, $2, $116, $7000, $A82A;
  811.     {$ENDC}
  812. FUNCTION SGGetUseScreenBuffer(c: SGChannel; VAR useScreenBuffer: BOOLEAN): ComponentResult;
  813.     {$IFC NOT GENERATINGCFM}
  814.     INLINE $2F3C, $4, $117, $7000, $A82A;
  815.     {$ENDC}
  816. FUNCTION SGGrabCompressComplete(c: SGChannel; VAR done: BOOLEAN; VAR ci: SGCompressInfo; VAR tr: TimeRecord): ComponentResult;
  817.     {$IFC NOT GENERATINGCFM}
  818.     INLINE $2F3C, $C, $118, $7000, $A82A;
  819.     {$ENDC}
  820. FUNCTION SGDisplayCompress(c: SGChannel; dataPtr: Ptr; desc: ImageDescriptionHandle; VAR mp: MatrixRecord; clipRgn: RgnHandle): ComponentResult;
  821.     {$IFC NOT GENERATINGCFM}
  822.     INLINE $2F3C, $10, $119, $7000, $A82A;
  823.     {$ENDC}
  824. FUNCTION SGSetFrameRate(c: SGChannel; frameRate: Fixed): ComponentResult;
  825.     {$IFC NOT GENERATINGCFM}
  826.     INLINE $2F3C, $4, $11A, $7000, $A82A;
  827.     {$ENDC}
  828. FUNCTION SGGetFrameRate(c: SGChannel; VAR frameRate: Fixed): ComponentResult;
  829.     {$IFC NOT GENERATINGCFM}
  830.     INLINE $2F3C, $4, $11B, $7000, $A82A;
  831.     {$ENDC}
  832. {** Sequence Grab SOUND CHANNEL Component Stuff **}
  833. {
  834.     Sound stuff
  835. }
  836. FUNCTION SGSetSoundInputDriver(c: SGChannel; driverName: ConstStr255Param): ComponentResult;
  837.     {$IFC NOT GENERATINGCFM}
  838.     INLINE $2F3C, $4, $100, $7000, $A82A;
  839.     {$ENDC}
  840. FUNCTION SGGetSoundInputDriver(c: SGChannel): LONGINT;
  841.     {$IFC NOT GENERATINGCFM}
  842.     INLINE $2F3C, 0, $101, $7000, $A82A;
  843.     {$ENDC}
  844. FUNCTION SGSoundInputDriverChanged(c: SGChannel): ComponentResult;
  845.     {$IFC NOT GENERATINGCFM}
  846.     INLINE $2F3C, 0, $102, $7000, $A82A;
  847.     {$ENDC}
  848. FUNCTION SGSetSoundRecordChunkSize(c: SGChannel; seconds: LONGINT): ComponentResult;
  849.     {$IFC NOT GENERATINGCFM}
  850.     INLINE $2F3C, $4, $103, $7000, $A82A;
  851.     {$ENDC}
  852. FUNCTION SGGetSoundRecordChunkSize(c: SGChannel): LONGINT;
  853.     {$IFC NOT GENERATINGCFM}
  854.     INLINE $2F3C, 0, $104, $7000, $A82A;
  855.     {$ENDC}
  856. FUNCTION SGSetSoundInputRate(c: SGChannel; rate: Fixed): ComponentResult;
  857.     {$IFC NOT GENERATINGCFM}
  858.     INLINE $2F3C, $4, $105, $7000, $A82A;
  859.     {$ENDC}
  860. FUNCTION SGGetSoundInputRate(c: SGChannel): Fixed;
  861.     {$IFC NOT GENERATINGCFM}
  862.     INLINE $2F3C, 0, $106, $7000, $A82A;
  863.     {$ENDC}
  864. FUNCTION SGSetSoundInputParameters(c: SGChannel; sampleSize: INTEGER; numChannels: INTEGER; compressionType: OSType): ComponentResult;
  865.     {$IFC NOT GENERATINGCFM}
  866.     INLINE $2F3C, $8, $107, $7000, $A82A;
  867.     {$ENDC}
  868. FUNCTION SGGetSoundInputParameters(c: SGChannel; VAR sampleSize: INTEGER; VAR numChannels: INTEGER; VAR compressionType: OSType): ComponentResult;
  869.     {$IFC NOT GENERATINGCFM}
  870.     INLINE $2F3C, $C, $108, $7000, $A82A;
  871.     {$ENDC}
  872.  
  873. CONST
  874.     sgChannelAtom                = 'chan';
  875.     sgChannelSettingsAtom        = 'ctom';
  876.     sgChannelDescription        = 'cdsc';
  877.     sgChannelSettings            = 'cset';
  878.  
  879.     sgDeviceNameType            = 'name';
  880.     sgUsageType                    = 'use ';
  881.     sgPlayFlagsType                = 'plyf';
  882.     sgClipType                    = 'clip';
  883.     sgMatrixType                = 'mtrx';
  884.     sgVolumeType                = 'volu';
  885.  
  886.     sgPanelSettingsAtom            = 'ptom';
  887.     sgPanelDescription            = 'pdsc';
  888.     sgPanelSettings                = 'pset';
  889.  
  890.     sgcSoundCompressionType        = 'scmp';
  891.     sgcSoundSampleRateType        = 'srat';
  892.     sgcSoundChannelCountType    = 'schn';
  893.     sgcSoundSampleSizeType        = 'ssiz';
  894.     sgcSoundInputType            = 'sinp';
  895.     sgcSoundGainType            = 'gain';
  896.  
  897.     sgcVideoHueType                = 'hue ';
  898.     sgcVideoSaturationType        = 'satr';
  899.     sgcVideoContrastType        = 'trst';
  900.     sgcVideoSharpnessType        = 'shrp';
  901.     sgcVideoBrigtnessType        = 'brit';
  902.     sgcVideoBlackLevelType        = 'blkl';
  903.     sgcVideoWhiteLevelType        = 'whtl';
  904.     sgcVideoInputType            = 'vinp';
  905.     sgcVideoFormatType            = 'vstd';
  906.     sgcVideoFilterType            = 'vflt';
  907.     sgcVideoRectType            = 'vrct';
  908.     sgVideoDigitizerType        = 'vdig';
  909.  
  910.     kSGInitializeSelect            = $1;
  911.     kSGSetDataOutputSelect        = $2;
  912.     kSGGetDataOutputSelect        = $3;
  913.     kSGSetGWorldSelect            = $4;
  914.     kSGGetGWorldSelect            = $5;
  915.     kSGNewChannelSelect            = $6;
  916.     kSGDisposeChannelSelect        = $7;
  917.     kSGStartPreviewSelect        = $10;
  918.     kSGStartRecordSelect        = $11;
  919.     kSGIdleSelect                = $12;
  920.     kSGStopSelect                = $13;
  921.     kSGPauseSelect                = $14;
  922.     kSGPrepareSelect            = $15;
  923.     kSGReleaseSelect            = $16;
  924.     kSGGetMovieSelect            = $17;
  925.     kSGSetMaximumRecordTimeSelect = $18;
  926.     kSGGetMaximumRecordTimeSelect = $19;
  927.     kSGGetStorageSpaceRemainingSelect = $1A;
  928.     kSGGetTimeRemainingSelect    = $1B;
  929.     kSGGrabPictSelect            = $1C;
  930.     kSGGetLastMovieResIDSelect    = $1D;
  931.     kSGSetFlagsSelect            = $1E;
  932.     kSGGetFlagsSelect            = $1F;
  933.     kSGSetDataProcSelect        = $20;
  934.     kSGNewChannelFromComponentSelect = $21;
  935.     kSGDisposeDeviceListSelect    = $22;
  936.     kSGAppendDeviceListToMenuSelect = $23;
  937.     kSGSetSettingsSelect        = $24;
  938.     kSGGetSettingsSelect        = $25;
  939.     kSGGetIndChannelSelect        = $26;
  940.     kSGUpdateSelect                = $27;
  941.     kSGGetPauseSelect            = $28;
  942.     kSGSettingsDialogSelect        = $29;
  943.     kSGGetAlignmentProcSelect    = $2A;
  944.     kSGSetChannelSettingsSelect    = $2B;
  945.     kSGGetChannelSettingsSelect    = $2C;
  946.     kSGGetModeSelect            = $2D;
  947.     kSGSetDataRefSelect            = $2E;
  948.     kSGGetDataRefSelect            = $2F;
  949.     kSGNewOutputSelect            = $30;
  950.     kSGDisposeOutputSelect        = $31;
  951.     kSGSetOutputFlagsSelect        = $32;
  952.     kSGSetChannelOutputSelect    = $33;
  953.     kSGGetDataOutputStorageSpaceRemainingSelect = $34;
  954.     kSGWriteMovieDataSelect        = $100;
  955.     kSGAddFrameReferenceSelect    = $101;
  956.     kSGGetNextFrameReferenceSelect = $102;
  957.     kSGGetTimeBaseSelect        = $103;
  958.     kSGSortDeviceListSelect        = $104;
  959.     kSGAddMovieDataSelect        = $105;
  960.     kSGChangedSourceSelect        = $106;
  961.     kSGCSetChannelUsageSelect    = $80;
  962.     kSGCGetChannelUsageSelect    = $81;
  963.     kSGCSetChannelBoundsSelect    = $82;
  964.     kSGCGetChannelBoundsSelect    = $83;
  965.     kSGCSetChannelVolumeSelect    = $84;
  966.     kSGCGetChannelVolumeSelect    = $85;
  967.     kSGCGetChannelInfoSelect    = $86;
  968.     kSGCSetChannelPlayFlagsSelect = $87;
  969.     kSGCGetChannelPlayFlagsSelect = $88;
  970.     kSGCSetChannelMaxFramesSelect = $89;
  971.     kSGCGetChannelMaxFramesSelect = $8A;
  972.     kSGCSetChannelRefConSelect    = $8B;
  973.     kSGCSetChannelClipSelect    = $8C;
  974.     kSGCGetChannelClipSelect    = $8D;
  975.     kSGCGetChannelSampleDescriptionSelect = $8E;
  976.     kSGCGetChannelDeviceListSelect = $8F;
  977.     kSGCSetChannelDeviceSelect    = $90;
  978.     kSGCSetChannelMatrixSelect    = $91;
  979.     kSGCGetChannelMatrixSelect    = $92;
  980.     kSGCGetChannelTimeScaleSelect = $93;
  981.     kSGCChannelPutPictureSelect    = $94;
  982.     kSGCChannelSetRequestedDataRateSelect = $95;
  983.     kSGCChannelGetRequestedDataRateSelect = $96;
  984.     kSGCChannelSetDataSourceNameSelect = $97;
  985.     kSGCChannelGetDataSourceNameSelect = $98;
  986.     kSGCInitChannelSelect        = $180;
  987.     kSGCWriteSamplesSelect        = $181;
  988.     kSGCGetDataRateSelect        = $182;
  989.     kSGCAlignChannelRectSelect    = $183;
  990.     kSGCPanelGetDitlSelect        = $200;
  991.     kSGCPanelGetTitleSelect        = $201;
  992.     kSGCPanelCanRunSelect        = $202;
  993.     kSGCPanelInstallSelect        = $203;
  994.     kSGCPanelEventSelect        = $204;
  995.     kSGCPanelItemSelect            = $205;
  996.     kSGCPanelRemoveSelect        = $206;
  997.     kSGCPanelSetGrabberSelect    = $207;
  998.     kSGCPanelSetResFileSelect    = $208;
  999.     kSGCPanelGetSettingsSelect    = $209;
  1000.     kSGCPanelSetSettingsSelect    = $20A;
  1001.     kSGCPanelValidateInputSelect = $20B;
  1002.     kSGCPanelSetEventFilterSelect = $20C;
  1003.     kSGCGetSrcVideoBoundsSelect    = $100;
  1004.     kSGCSetVideoRectSelect        = $101;
  1005.     kSGCGetVideoRectSelect        = $102;
  1006.     kSGCGetVideoCompressorTypeSelect = $103;
  1007.     kSGCSetVideoCompressorTypeSelect = $104;
  1008.     kSGCSetVideoCompressorSelect = $105;
  1009.     kSGCGetVideoCompressorSelect = $106;
  1010.     kSGCGetVideoDigitizerComponentSelect = $107;
  1011.     kSGCSetVideoDigitizerComponentSelect = $108;
  1012.     kSGCVideoDigitizerChangedSelect = $109;
  1013.     kSGCSetVideoBottlenecksSelect = $10A;
  1014.     kSGCGetVideoBottlenecksSelect = $10B;
  1015.     kSGCGrabFrameSelect            = $10C;
  1016.     kSGCGrabFrameCompleteSelect    = $10D;
  1017.     kSGCDisplayFrameSelect        = $10E;
  1018.     kSGCCompressFrameSelect        = $10F;
  1019.     kSGCCompressFrameCompleteSelect = $110;
  1020.     kSGCAddFrameSelect            = $111;
  1021.     kSGCTransferFrameForCompressSelect = $112;
  1022.     kSGCSetCompressBufferSelect    = $113;
  1023.     kSGCGetCompressBufferSelect    = $114;
  1024.     kSGCGetBufferInfoSelect        = $115;
  1025.     kSGCSetUseScreenBufferSelect = $116;
  1026.     kSGCGetUseScreenBufferSelect = $117;
  1027.     kSGCGrabCompressCompleteSelect = $118;
  1028.     kSGCDisplayCompressSelect    = $119;
  1029.     kSGCSetFrameRateSelect        = $11A;
  1030.     kSGCGetFrameRateSelect        = $11B;
  1031.     kSGCSetSoundInputDriverSelect = $100;
  1032.     kSGCGetSoundInputDriverSelect = $101;
  1033.     kSGCSoundInputDriverChangedSelect = $102;
  1034.     kSGCSetSoundRecordChunkSizeSelect = $103;
  1035.     kSGCGetSoundRecordChunkSizeSelect = $104;
  1036.     kSGCSetSoundInputRateSelect    = $105;
  1037.     kSGCGetSoundInputRateSelect    = $106;
  1038.     kSGCSetSoundInputParametersSelect = $107;
  1039.     kSGCGetSoundInputParametersSelect = $108;
  1040.  
  1041. { Standard type for video digitizers }
  1042.     videoDigitizerComponentType    = 'vdig';
  1043.     vdigInterfaceRev            = 2;
  1044.  
  1045. { Input Format Standards }
  1046.     ntscIn                        = 0;                            { current input format }
  1047.     currentIn                    = 0;                            { ntsc input format }
  1048.     palIn                        = 1;                            { pal input format }
  1049.     secamIn                        = 2;                            { secam input format }
  1050.     ntscReallyIn                = 3;                            { ntsc input format }
  1051.  
  1052. { Input Formats }
  1053.     compositeIn                    = 0;                            { input is composite format }
  1054.     sVideoIn                    = 1;                            { input is sVideo format }
  1055.     rgbComponentIn                = 2;                            { input is rgb component format }
  1056.     rgbComponentSyncIn            = 3;                            { input is rgb component format (sync on green?)}
  1057.     yuvComponentIn                = 4;                            { input is yuv component format }
  1058.     yuvComponentSyncIn            = 5;                            { input is yuv component format (sync on green?) }
  1059.     tvTunerIn                    = 6;
  1060.  
  1061. { Video Digitizer PlayThru States }
  1062.     vdPlayThruOff                = 0;
  1063.     vdPlayThruOn                = 1;
  1064.  
  1065. { Input Color Space Modes }
  1066.     vdDigitizerBW                = 0;                            { black and white }
  1067.     vdDigitizerRGB                = 1;                            { rgb color }
  1068.  
  1069. { Phase Lock Loop Modes }
  1070.     vdBroadcastMode                = 0;                            { Broadcast / Laser Disk video mode }
  1071.     vdVTRMode                    = 1;                            { VCR / Magnetic media mode }
  1072.  
  1073. { Field Select Options }
  1074.     vdUseAnyField                = 0;                            { Digitizers choice on field use }
  1075.     vdUseOddField                = 1;                            { Use odd field for half size vert and smaller }
  1076.     vdUseEvenField                = 2;                            { Use even field for half size vert and smaller }
  1077.  
  1078. { vdig types }
  1079.     vdTypeBasic                    = 0;                            { basic, no clipping }
  1080.     vdTypeAlpha                    = 1;                            { supports clipping with alpha channel }
  1081.     vdTypeMask                    = 2;                            { supports clipping with mask plane }
  1082.     vdTypeKey                    = 3;                            { supports clipping with key color(s) }
  1083.  
  1084. { Digitizer Input Capability/Current Flags    }
  1085.     digiInDoesNTSC                = 1 * (2**(0));                    { digitizer supports NTSC input format }
  1086.     digiInDoesPAL                = 1 * (2**(1));                    { digitizer supports PAL input format }
  1087.     digiInDoesSECAM                = 1 * (2**(2));                    { digitizer supports SECAM input format }
  1088.     digiInDoesGenLock            = 1 * (2**(7));                    { digitizer does genlock }
  1089.     digiInDoesComposite            = 1 * (2**(8));                    { digitizer supports composite input type }
  1090.     digiInDoesSVideo            = 1 * (2**(9));                    { digitizer supports S-Video input type }
  1091.     digiInDoesComponent            = 1 * (2**(10));                { digitizer supports component = rgb, input type }
  1092.     digiInVTR_Broadcast            = 1 * (2**(11));                { digitizer can differentiate between the two }
  1093.     digiInDoesColor                = 1 * (2**(12));                { digitizer supports color }
  1094.     digiInDoesBW                = 1 * (2**(13));                { digitizer supports black & white }
  1095. { Digitizer Input Current Flags = these are valid only during active operating conditions,    }
  1096.     digiInSignalLock            = 1 * (2**(31));                { digitizer detects input signal is locked, this bit = horiz lock || vertical lock }
  1097.  
  1098. { Digitizer Output Capability/Current Flags }
  1099.     digiOutDoes1                = 1 * (2**(0));                    { digitizer supports 1 bit pixels }
  1100.     digiOutDoes2                = 1 * (2**(1));                    { digitizer supports 2 bit pixels }
  1101.     digiOutDoes4                = 1 * (2**(2));                    { digitizer supports 4 bit pixels }
  1102.     digiOutDoes8                = 1 * (2**(3));                    { digitizer supports 8 bit pixels }
  1103.     digiOutDoes16                = 1 * (2**(4));                    { digitizer supports 16 bit pixels }
  1104.     digiOutDoes32                = 1 * (2**(5));                    { digitizer supports 32 bit pixels }
  1105.     digiOutDoesDither            = 1 * (2**(6));                    { digitizer dithers in indexed modes }
  1106.     digiOutDoesStretch            = 1 * (2**(7));                    { digitizer can arbitrarily stretch }
  1107.     digiOutDoesShrink            = 1 * (2**(8));                    { digitizer can arbitrarily shrink }
  1108.     digiOutDoesMask                = 1 * (2**(9));                    { digitizer can mask to clipping regions }
  1109.     digiOutDoesDouble            = 1 * (2**(11));                { digitizer can stretch to exactly double size }
  1110.     digiOutDoesQuad                = 1 * (2**(12));                { digitizer can stretch exactly quadruple size }
  1111.     digiOutDoesQuarter            = 1 * (2**(13));                { digitizer can shrink to exactly quarter size }
  1112.     digiOutDoesSixteenth        = 1 * (2**(14));                { digitizer can shrink to exactly sixteenth size }
  1113.     digiOutDoesRotate            = 1 * (2**(15));                { digitizer supports rotate transformations }
  1114.     digiOutDoesHorizFlip        = 1 * (2**(16));                { digitizer supports horizontal flips Sx < 0 }
  1115.     digiOutDoesVertFlip            = 1 * (2**(17));                { digitizer supports vertical flips Sy < 0 }
  1116.     digiOutDoesSkew                = 1 * (2**(18));                { digitizer supports skew = shear,twist, }
  1117.     digiOutDoesBlend            = 1 * (2**(19));
  1118.     digiOutDoesWarp                = 1 * (2**(20));
  1119.     digiOutDoesHW_DMA            = 1 * (2**(21));                { digitizer not constrained to local device }
  1120.     digiOutDoesHWPlayThru        = 1 * (2**(22));                { digitizer doesn't need time to play thru }
  1121.     digiOutDoesILUT                = 1 * (2**(23));                { digitizer does inverse LUT for index modes }
  1122.     digiOutDoesKeyColor            = 1 * (2**(24));                { digitizer does key color functions too }
  1123.     digiOutDoesAsyncGrabs        = 1 * (2**(25));                { digitizer supports async grabs }
  1124.     digiOutDoesUnreadableScreenBits = 1 * (2**(26));            { playthru doesn't generate readable bits on screen}
  1125.     digiOutDoesCompress            = 1 * (2**(27));                { supports alternate output data types }
  1126.     digiOutDoesCompressOnly        = 1 * (2**(28));                { can't provide raw frames anywhere }
  1127.     digiOutDoesPlayThruDuringCompress = 1 * (2**(29));            { digi can do playthru while providing compressed data }
  1128.  
  1129. { Types }
  1130.     
  1131. TYPE
  1132.     VideoDigitizerComponent = ComponentInstance;
  1133.  
  1134.     VideoDigitizerError = ComponentResult;
  1135.  
  1136.     DigitizerInfo = RECORD
  1137.         vdigType:                INTEGER;
  1138.         inputCapabilityFlags:    LONGINT;
  1139.         outputCapabilityFlags:    LONGINT;
  1140.         inputCurrentFlags:        LONGINT;
  1141.         outputCurrentFlags:        LONGINT;
  1142.         slot:                    INTEGER;                                { temporary for connection purposes }
  1143.         gdh:                    GDHandle;                                { temporary for digitizers that have preferred screen }
  1144.         maskgdh:                GDHandle;                                { temporary for digitizers that have mask planes }
  1145.         minDestHeight:            INTEGER;                                { Smallest resizable height }
  1146.         minDestWidth:            INTEGER;                                { Smallest resizable width }
  1147.         maxDestHeight:            INTEGER;                                { Largest resizable height }
  1148.         maxDestWidth:            INTEGER;                                { Largest resizable height }
  1149.         blendLevels:            INTEGER;                                { Number of blend levels supported (2 if 1 bit mask) }
  1150.         reserved:                LONGINT;                                { reserved }
  1151.     END;
  1152.  
  1153.     VdigType = RECORD
  1154.         digType:                LONGINT;
  1155.         reserved:                LONGINT;
  1156.     END;
  1157.  
  1158.     VdigTypeList = RECORD
  1159.         count:                    INTEGER;
  1160.         list:                    ARRAY [0..0] OF VdigType;
  1161.     END;
  1162.  
  1163.     VdigBufferRec = RECORD
  1164.         dest:                    PixMapHandle;
  1165.         location:                Point;
  1166.         reserved:                LONGINT;
  1167.     END;
  1168.  
  1169.     VdigBufferRecList = RECORD
  1170.         count:                    INTEGER;
  1171.         matrix:                    MatrixRecordPtr;
  1172.         mask:                    RgnHandle;
  1173.         list:                    ARRAY [0..0] OF VdigBufferRec;
  1174.     END;
  1175.  
  1176.     VdigBufferRecListPtr = ^VdigBufferRecList;
  1177.     VdigBufferRecListHandle = ^VdigBufferRecListPtr;
  1178.  
  1179.     VdigIntProcPtr = ProcPtr;  { PROCEDURE VdigInt(flags: LONGINT; refcon: LONGINT); }
  1180.     VdigIntUPP = UniversalProcPtr;
  1181.  
  1182.     VDCompressionList = RECORD
  1183.         codec:                    CodecComponent;
  1184.         cType:                    CodecType;
  1185.         typeName:                Str63;
  1186.         name:                    Str63;
  1187.         formatFlags:            LONGINT;
  1188.         compressFlags:            LONGINT;
  1189.         reserved:                LONGINT;
  1190.     END;
  1191.  
  1192.     VDCompressionListPtr = ^VDCompressionList;
  1193.     VDCompressionListHandle = ^VDCompressionListPtr;
  1194.  
  1195.  
  1196. CONST
  1197.     dmaDepth1                    = 1;
  1198.     dmaDepth2                    = 2;
  1199.     dmaDepth4                    = 4;
  1200.     dmaDepth8                    = 8;
  1201.     dmaDepth16                    = 16;
  1202.     dmaDepth32                    = 32;
  1203.     dmaDepth2Gray                = 64;
  1204.     dmaDepth4Gray                = 128;
  1205.     dmaDepth8Gray                = 256;
  1206.  
  1207.     kVDIGControlledFrameRate    = -1;
  1208.  
  1209. { number of vdig calls}
  1210.     kvdigSelectors                = 86;
  1211.  
  1212.  
  1213. FUNCTION VDGetMaxSrcRect(ci: VideoDigitizerComponent; inputStd: INTEGER; VAR maxSrcRect: Rect): VideoDigitizerError;
  1214.     {$IFC NOT GENERATINGCFM}
  1215.     INLINE $2F3C, $6, $1, $7000, $A82A;
  1216.     {$ENDC}
  1217. FUNCTION VDGetActiveSrcRect(ci: VideoDigitizerComponent; inputStd: INTEGER; VAR activeSrcRect: Rect): VideoDigitizerError;
  1218.     {$IFC NOT GENERATINGCFM}
  1219.     INLINE $2F3C, $6, $2, $7000, $A82A;
  1220.     {$ENDC}
  1221. FUNCTION VDSetDigitizerRect(ci: VideoDigitizerComponent; VAR digitizerRect: Rect): VideoDigitizerError;
  1222.     {$IFC NOT GENERATINGCFM}
  1223.     INLINE $2F3C, $4, $3, $7000, $A82A;
  1224.     {$ENDC}
  1225. FUNCTION VDGetDigitizerRect(ci: VideoDigitizerComponent; VAR digitizerRect: Rect): VideoDigitizerError;
  1226.     {$IFC NOT GENERATINGCFM}
  1227.     INLINE $2F3C, $4, $4, $7000, $A82A;
  1228.     {$ENDC}
  1229. FUNCTION VDGetVBlankRect(ci: VideoDigitizerComponent; inputStd: INTEGER; VAR vBlankRect: Rect): VideoDigitizerError;
  1230.     {$IFC NOT GENERATINGCFM}
  1231.     INLINE $2F3C, $6, $5, $7000, $A82A;
  1232.     {$ENDC}
  1233. FUNCTION VDGetMaskPixMap(ci: VideoDigitizerComponent; maskPixMap: PixMapHandle): VideoDigitizerError;
  1234.     {$IFC NOT GENERATINGCFM}
  1235.     INLINE $2F3C, $4, $6, $7000, $A82A;
  1236.     {$ENDC}
  1237. FUNCTION VDGetPlayThruDestination(ci: VideoDigitizerComponent; VAR dest: PixMapHandle; VAR destRect: Rect; VAR m: MatrixRecord; VAR mask: RgnHandle): VideoDigitizerError;
  1238.     {$IFC NOT GENERATINGCFM}
  1239.     INLINE $2F3C, $10, $8, $7000, $A82A;
  1240.     {$ENDC}
  1241. FUNCTION VDUseThisCLUT(ci: VideoDigitizerComponent; colorTableHandle: CTabHandle): VideoDigitizerError;
  1242.     {$IFC NOT GENERATINGCFM}
  1243.     INLINE $2F3C, $4, $9, $7000, $A82A;
  1244.     {$ENDC}
  1245. FUNCTION VDSetInputGammaValue(ci: VideoDigitizerComponent; channel1: Fixed; channel2: Fixed; channel3: Fixed): VideoDigitizerError;
  1246.     {$IFC NOT GENERATINGCFM}
  1247.     INLINE $2F3C, $C, $A, $7000, $A82A;
  1248.     {$ENDC}
  1249. FUNCTION VDGetInputGammaValue(ci: VideoDigitizerComponent; VAR channel1: Fixed; VAR channel2: Fixed; VAR channel3: Fixed): VideoDigitizerError;
  1250.     {$IFC NOT GENERATINGCFM}
  1251.     INLINE $2F3C, $C, $B, $7000, $A82A;
  1252.     {$ENDC}
  1253. FUNCTION VDSetBrightness(ci: VideoDigitizerComponent; VAR brightness: INTEGER): VideoDigitizerError;
  1254.     {$IFC NOT GENERATINGCFM}
  1255.     INLINE $2F3C, $4, $C, $7000, $A82A;
  1256.     {$ENDC}
  1257. FUNCTION VDGetBrightness(ci: VideoDigitizerComponent; VAR brightness: INTEGER): VideoDigitizerError;
  1258.     {$IFC NOT GENERATINGCFM}
  1259.     INLINE $2F3C, $4, $D, $7000, $A82A;
  1260.     {$ENDC}
  1261. FUNCTION VDSetContrast(ci: VideoDigitizerComponent; VAR contrast: INTEGER): VideoDigitizerError;
  1262.     {$IFC NOT GENERATINGCFM}
  1263.     INLINE $2F3C, $4, $E, $7000, $A82A;
  1264.     {$ENDC}
  1265. FUNCTION VDSetHue(ci: VideoDigitizerComponent; VAR hue: INTEGER): VideoDigitizerError;
  1266.     {$IFC NOT GENERATINGCFM}
  1267.     INLINE $2F3C, $4, $F, $7000, $A82A;
  1268.     {$ENDC}
  1269. FUNCTION VDSetSharpness(ci: VideoDigitizerComponent; VAR sharpness: INTEGER): VideoDigitizerError;
  1270.     {$IFC NOT GENERATINGCFM}
  1271.     INLINE $2F3C, $4, $10, $7000, $A82A;
  1272.     {$ENDC}
  1273. FUNCTION VDSetSaturation(ci: VideoDigitizerComponent; VAR saturation: INTEGER): VideoDigitizerError;
  1274.     {$IFC NOT GENERATINGCFM}
  1275.     INLINE $2F3C, $4, $11, $7000, $A82A;
  1276.     {$ENDC}
  1277. FUNCTION VDGetContrast(ci: VideoDigitizerComponent; VAR contrast: INTEGER): VideoDigitizerError;
  1278.     {$IFC NOT GENERATINGCFM}
  1279.     INLINE $2F3C, $4, $12, $7000, $A82A;
  1280.     {$ENDC}
  1281. FUNCTION VDGetHue(ci: VideoDigitizerComponent; VAR hue: INTEGER): VideoDigitizerError;
  1282.     {$IFC NOT GENERATINGCFM}
  1283.     INLINE $2F3C, $4, $13, $7000, $A82A;
  1284.     {$ENDC}
  1285. FUNCTION VDGetSharpness(ci: VideoDigitizerComponent; VAR sharpness: INTEGER): VideoDigitizerError;
  1286.     {$IFC NOT GENERATINGCFM}
  1287.     INLINE $2F3C, $4, $14, $7000, $A82A;
  1288.     {$ENDC}
  1289. FUNCTION VDGetSaturation(ci: VideoDigitizerComponent; VAR saturation: INTEGER): VideoDigitizerError;
  1290.     {$IFC NOT GENERATINGCFM}
  1291.     INLINE $2F3C, $4, $15, $7000, $A82A;
  1292.     {$ENDC}
  1293. FUNCTION VDGrabOneFrame(ci: VideoDigitizerComponent): VideoDigitizerError;
  1294.     {$IFC NOT GENERATINGCFM}
  1295.     INLINE $2F3C, 0, $16, $7000, $A82A;
  1296.     {$ENDC}
  1297. FUNCTION VDGetMaxAuxBuffer(ci: VideoDigitizerComponent; VAR pm: PixMapHandle; VAR r: Rect): VideoDigitizerError;
  1298.     {$IFC NOT GENERATINGCFM}
  1299.     INLINE $2F3C, $8, $17, $7000, $A82A;
  1300.     {$ENDC}
  1301. FUNCTION VDGetDigitizerInfo(ci: VideoDigitizerComponent; VAR info: DigitizerInfo): VideoDigitizerError;
  1302.     {$IFC NOT GENERATINGCFM}
  1303.     INLINE $2F3C, $4, $19, $7000, $A82A;
  1304.     {$ENDC}
  1305. FUNCTION VDGetCurrentFlags(ci: VideoDigitizerComponent; VAR inputCurrentFlag: LONGINT; VAR outputCurrentFlag: LONGINT): VideoDigitizerError;
  1306.     {$IFC NOT GENERATINGCFM}
  1307.     INLINE $2F3C, $8, $1A, $7000, $A82A;
  1308.     {$ENDC}
  1309. FUNCTION VDSetKeyColor(ci: VideoDigitizerComponent; index: LONGINT): VideoDigitizerError;
  1310.     {$IFC NOT GENERATINGCFM}
  1311.     INLINE $2F3C, $4, $1B, $7000, $A82A;
  1312.     {$ENDC}
  1313. FUNCTION VDGetKeyColor(ci: VideoDigitizerComponent; VAR index: LONGINT): VideoDigitizerError;
  1314.     {$IFC NOT GENERATINGCFM}
  1315.     INLINE $2F3C, $4, $1C, $7000, $A82A;
  1316.     {$ENDC}
  1317. FUNCTION VDAddKeyColor(ci: VideoDigitizerComponent; VAR index: LONGINT): VideoDigitizerError;
  1318.     {$IFC NOT GENERATINGCFM}
  1319.     INLINE $2F3C, $4, $1D, $7000, $A82A;
  1320.     {$ENDC}
  1321. FUNCTION VDGetNextKeyColor(ci: VideoDigitizerComponent; index: LONGINT): VideoDigitizerError;
  1322.     {$IFC NOT GENERATINGCFM}
  1323.     INLINE $2F3C, $4, $1E, $7000, $A82A;
  1324.     {$ENDC}
  1325. FUNCTION VDSetKeyColorRange(ci: VideoDigitizerComponent; VAR minRGB: RGBColor; VAR maxRGB: RGBColor): VideoDigitizerError;
  1326.     {$IFC NOT GENERATINGCFM}
  1327.     INLINE $2F3C, $8, $1F, $7000, $A82A;
  1328.     {$ENDC}
  1329. FUNCTION VDGetKeyColorRange(ci: VideoDigitizerComponent; VAR minRGB: RGBColor; VAR maxRGB: RGBColor): VideoDigitizerError;
  1330.     {$IFC NOT GENERATINGCFM}
  1331.     INLINE $2F3C, $8, $20, $7000, $A82A;
  1332.     {$ENDC}
  1333. FUNCTION VDSetDigitizerUserInterrupt(ci: VideoDigitizerComponent; flags: LONGINT; userInterruptProc: VdigIntUPP; refcon: LONGINT): VideoDigitizerError;
  1334.     {$IFC NOT GENERATINGCFM}
  1335.     INLINE $2F3C, $C, $21, $7000, $A82A;
  1336.     {$ENDC}
  1337. FUNCTION VDSetInputColorSpaceMode(ci: VideoDigitizerComponent; colorSpaceMode: INTEGER): VideoDigitizerError;
  1338.     {$IFC NOT GENERATINGCFM}
  1339.     INLINE $2F3C, $2, $22, $7000, $A82A;
  1340.     {$ENDC}
  1341. FUNCTION VDGetInputColorSpaceMode(ci: VideoDigitizerComponent; VAR colorSpaceMode: INTEGER): VideoDigitizerError;
  1342.     {$IFC NOT GENERATINGCFM}
  1343.     INLINE $2F3C, $4, $23, $7000, $A82A;
  1344.     {$ENDC}
  1345. FUNCTION VDSetClipState(ci: VideoDigitizerComponent; clipEnable: INTEGER): VideoDigitizerError;
  1346.     {$IFC NOT GENERATINGCFM}
  1347.     INLINE $2F3C, $2, $24, $7000, $A82A;
  1348.     {$ENDC}
  1349. FUNCTION VDGetClipState(ci: VideoDigitizerComponent; VAR clipEnable: INTEGER): VideoDigitizerError;
  1350.     {$IFC NOT GENERATINGCFM}
  1351.     INLINE $2F3C, $4, $25, $7000, $A82A;
  1352.     {$ENDC}
  1353. FUNCTION VDSetClipRgn(ci: VideoDigitizerComponent; clipRegion: RgnHandle): VideoDigitizerError;
  1354.     {$IFC NOT GENERATINGCFM}
  1355.     INLINE $2F3C, $4, $26, $7000, $A82A;
  1356.     {$ENDC}
  1357. FUNCTION VDClearClipRgn(ci: VideoDigitizerComponent; clipRegion: RgnHandle): VideoDigitizerError;
  1358.     {$IFC NOT GENERATINGCFM}
  1359.     INLINE $2F3C, $4, $27, $7000, $A82A;
  1360.     {$ENDC}
  1361. FUNCTION VDGetCLUTInUse(ci: VideoDigitizerComponent; VAR colorTableHandle: CTabHandle): VideoDigitizerError;
  1362.     {$IFC NOT GENERATINGCFM}
  1363.     INLINE $2F3C, $4, $28, $7000, $A82A;
  1364.     {$ENDC}
  1365. FUNCTION VDSetPLLFilterType(ci: VideoDigitizerComponent; pllType: INTEGER): VideoDigitizerError;
  1366.     {$IFC NOT GENERATINGCFM}
  1367.     INLINE $2F3C, $2, $29, $7000, $A82A;
  1368.     {$ENDC}
  1369. FUNCTION VDGetPLLFilterType(ci: VideoDigitizerComponent; VAR pllType: INTEGER): VideoDigitizerError;
  1370.     {$IFC NOT GENERATINGCFM}
  1371.     INLINE $2F3C, $4, $2A, $7000, $A82A;
  1372.     {$ENDC}
  1373. FUNCTION VDGetMaskandValue(ci: VideoDigitizerComponent; blendLevel: INTEGER; VAR mask: LONGINT; VAR value: LONGINT): VideoDigitizerError;
  1374.     {$IFC NOT GENERATINGCFM}
  1375.     INLINE $2F3C, $A, $2B, $7000, $A82A;
  1376.     {$ENDC}
  1377. FUNCTION VDSetMasterBlendLevel(ci: VideoDigitizerComponent; VAR blendLevel: INTEGER): VideoDigitizerError;
  1378.     {$IFC NOT GENERATINGCFM}
  1379.     INLINE $2F3C, $4, $2C, $7000, $A82A;
  1380.     {$ENDC}
  1381. FUNCTION VDSetPlayThruDestination(ci: VideoDigitizerComponent; dest: PixMapHandle; VAR destRect: Rect; VAR m: MatrixRecord; mask: RgnHandle): VideoDigitizerError;
  1382.     {$IFC NOT GENERATINGCFM}
  1383.     INLINE $2F3C, $10, $2D, $7000, $A82A;
  1384.     {$ENDC}
  1385. FUNCTION VDSetPlayThruOnOff(ci: VideoDigitizerComponent; state: INTEGER): VideoDigitizerError;
  1386.     {$IFC NOT GENERATINGCFM}
  1387.     INLINE $2F3C, $2, $2E, $7000, $A82A;
  1388.     {$ENDC}
  1389. FUNCTION VDSetFieldPreference(ci: VideoDigitizerComponent; fieldFlag: INTEGER): VideoDigitizerError;
  1390.     {$IFC NOT GENERATINGCFM}
  1391.     INLINE $2F3C, $2, $2F, $7000, $A82A;
  1392.     {$ENDC}
  1393. FUNCTION VDGetFieldPreference(ci: VideoDigitizerComponent; VAR fieldFlag: INTEGER): VideoDigitizerError;
  1394.     {$IFC NOT GENERATINGCFM}
  1395.     INLINE $2F3C, $4, $30, $7000, $A82A;
  1396.     {$ENDC}
  1397. FUNCTION VDPreflightDestination(ci: VideoDigitizerComponent; VAR digitizerRect: Rect; VAR dest: PixMap; VAR destRect: Rect; VAR m: MatrixRecord): VideoDigitizerError;
  1398.     {$IFC NOT GENERATINGCFM}
  1399.     INLINE $2F3C, $10, $32, $7000, $A82A;
  1400.     {$ENDC}
  1401. FUNCTION VDPreflightGlobalRect(ci: VideoDigitizerComponent; theWindow: GrafPtr; VAR globalRect: Rect): VideoDigitizerError;
  1402.     {$IFC NOT GENERATINGCFM}
  1403.     INLINE $2F3C, $8, $33, $7000, $A82A;
  1404.     {$ENDC}
  1405. FUNCTION VDSetPlayThruGlobalRect(ci: VideoDigitizerComponent; theWindow: GrafPtr; VAR globalRect: Rect): VideoDigitizerError;
  1406.     {$IFC NOT GENERATINGCFM}
  1407.     INLINE $2F3C, $8, $34, $7000, $A82A;
  1408.     {$ENDC}
  1409. FUNCTION VDSetInputGammaRecord(ci: VideoDigitizerComponent; inputGammaPtr: VDGamRecPtr): VideoDigitizerError;
  1410.     {$IFC NOT GENERATINGCFM}
  1411.     INLINE $2F3C, $4, $35, $7000, $A82A;
  1412.     {$ENDC}
  1413. FUNCTION VDGetInputGammaRecord(ci: VideoDigitizerComponent; VAR inputGammaPtr: VDGamRecPtr): VideoDigitizerError;
  1414.     {$IFC NOT GENERATINGCFM}
  1415.     INLINE $2F3C, $4, $36, $7000, $A82A;
  1416.     {$ENDC}
  1417. FUNCTION VDSetBlackLevelValue(ci: VideoDigitizerComponent; VAR blackLevel: INTEGER): VideoDigitizerError;
  1418.     {$IFC NOT GENERATINGCFM}
  1419.     INLINE $2F3C, $4, $37, $7000, $A82A;
  1420.     {$ENDC}
  1421. FUNCTION VDGetBlackLevelValue(ci: VideoDigitizerComponent; VAR blackLevel: INTEGER): VideoDigitizerError;
  1422.     {$IFC NOT GENERATINGCFM}
  1423.     INLINE $2F3C, $4, $38, $7000, $A82A;
  1424.     {$ENDC}
  1425. FUNCTION VDSetWhiteLevelValue(ci: VideoDigitizerComponent; VAR whiteLevel: INTEGER): VideoDigitizerError;
  1426.     {$IFC NOT GENERATINGCFM}
  1427.     INLINE $2F3C, $4, $39, $7000, $A82A;
  1428.     {$ENDC}
  1429. FUNCTION VDGetWhiteLevelValue(ci: VideoDigitizerComponent; VAR whiteLevel: INTEGER): VideoDigitizerError;
  1430.     {$IFC NOT GENERATINGCFM}
  1431.     INLINE $2F3C, $4, $3A, $7000, $A82A;
  1432.     {$ENDC}
  1433. FUNCTION VDGetVideoDefaults(ci: VideoDigitizerComponent; VAR blackLevel: INTEGER; VAR whiteLevel: INTEGER; VAR brightness: INTEGER; VAR hue: INTEGER; VAR saturation: INTEGER; VAR contrast: INTEGER; VAR sharpness: INTEGER): VideoDigitizerError;
  1434.     {$IFC NOT GENERATINGCFM}
  1435.     INLINE $2F3C, $1C, $3B, $7000, $A82A;
  1436.     {$ENDC}
  1437. FUNCTION VDGetNumberOfInputs(ci: VideoDigitizerComponent; VAR inputs: INTEGER): VideoDigitizerError;
  1438.     {$IFC NOT GENERATINGCFM}
  1439.     INLINE $2F3C, $4, $3C, $7000, $A82A;
  1440.     {$ENDC}
  1441. FUNCTION VDGetInputFormat(ci: VideoDigitizerComponent; input: INTEGER; VAR format: INTEGER): VideoDigitizerError;
  1442.     {$IFC NOT GENERATINGCFM}
  1443.     INLINE $2F3C, $6, $3D, $7000, $A82A;
  1444.     {$ENDC}
  1445. FUNCTION VDSetInput(ci: VideoDigitizerComponent; input: INTEGER): VideoDigitizerError;
  1446.     {$IFC NOT GENERATINGCFM}
  1447.     INLINE $2F3C, $2, $3E, $7000, $A82A;
  1448.     {$ENDC}
  1449. FUNCTION VDGetInput(ci: VideoDigitizerComponent; VAR input: INTEGER): VideoDigitizerError;
  1450.     {$IFC NOT GENERATINGCFM}
  1451.     INLINE $2F3C, $4, $3F, $7000, $A82A;
  1452.     {$ENDC}
  1453. FUNCTION VDSetInputStandard(ci: VideoDigitizerComponent; inputStandard: INTEGER): VideoDigitizerError;
  1454.     {$IFC NOT GENERATINGCFM}
  1455.     INLINE $2F3C, $2, $40, $7000, $A82A;
  1456.     {$ENDC}
  1457. FUNCTION VDSetupBuffers(ci: VideoDigitizerComponent; bufferList: VdigBufferRecListHandle): VideoDigitizerError;
  1458.     {$IFC NOT GENERATINGCFM}
  1459.     INLINE $2F3C, $4, $41, $7000, $A82A;
  1460.     {$ENDC}
  1461. FUNCTION VDGrabOneFrameAsync(ci: VideoDigitizerComponent; buffer: INTEGER): VideoDigitizerError;
  1462.     {$IFC NOT GENERATINGCFM}
  1463.     INLINE $2F3C, $2, $42, $7000, $A82A;
  1464.     {$ENDC}
  1465. FUNCTION VDDone(ci: VideoDigitizerComponent; buffer: INTEGER): VideoDigitizerError;
  1466.     {$IFC NOT GENERATINGCFM}
  1467.     INLINE $2F3C, $2, $43, $7000, $A82A;
  1468.     {$ENDC}
  1469. FUNCTION VDSetCompression(ci: VideoDigitizerComponent; compressType: OSType; depth: INTEGER; VAR bounds: Rect; spatialQuality: CodecQ; temporalQuality: CodecQ; keyFrameRate: LONGINT): VideoDigitizerError;
  1470.     {$IFC NOT GENERATINGCFM}
  1471.     INLINE $2F3C, $16, $44, $7000, $A82A;
  1472.     {$ENDC}
  1473. FUNCTION VDCompressOneFrameAsync(ci: VideoDigitizerComponent): VideoDigitizerError;
  1474.     {$IFC NOT GENERATINGCFM}
  1475.     INLINE $2F3C, 0, $45, $7000, $A82A;
  1476.     {$ENDC}
  1477. FUNCTION VDCompressDone(ci: VideoDigitizerComponent; VAR done: BOOLEAN; VAR theData: Ptr; VAR dataSize: LONGINT; VAR similarity: UInt8; VAR t: TimeRecord): VideoDigitizerError;
  1478.     {$IFC NOT GENERATINGCFM}
  1479.     INLINE $2F3C, $14, $46, $7000, $A82A;
  1480.     {$ENDC}
  1481. FUNCTION VDReleaseCompressBuffer(ci: VideoDigitizerComponent; bufferAddr: Ptr): VideoDigitizerError;
  1482.     {$IFC NOT GENERATINGCFM}
  1483.     INLINE $2F3C, $4, $47, $7000, $A82A;
  1484.     {$ENDC}
  1485. FUNCTION VDGetImageDescription(ci: VideoDigitizerComponent; desc: ImageDescriptionHandle): VideoDigitizerError;
  1486.     {$IFC NOT GENERATINGCFM}
  1487.     INLINE $2F3C, $4, $48, $7000, $A82A;
  1488.     {$ENDC}
  1489. FUNCTION VDResetCompressSequence(ci: VideoDigitizerComponent): VideoDigitizerError;
  1490.     {$IFC NOT GENERATINGCFM}
  1491.     INLINE $2F3C, 0, $49, $7000, $A82A;
  1492.     {$ENDC}
  1493. FUNCTION VDSetCompressionOnOff(ci: VideoDigitizerComponent; state: BOOLEAN): VideoDigitizerError;
  1494.     {$IFC NOT GENERATINGCFM}
  1495.     INLINE $2F3C, $2, $4A, $7000, $A82A;
  1496.     {$ENDC}
  1497. FUNCTION VDGetCompressionTypes(ci: VideoDigitizerComponent; h: VDCompressionListHandle): VideoDigitizerError;
  1498.     {$IFC NOT GENERATINGCFM}
  1499.     INLINE $2F3C, $4, $4B, $7000, $A82A;
  1500.     {$ENDC}
  1501. FUNCTION VDSetTimeBase(ci: VideoDigitizerComponent; t: TimeBase): VideoDigitizerError;
  1502.     {$IFC NOT GENERATINGCFM}
  1503.     INLINE $2F3C, $4, $4C, $7000, $A82A;
  1504.     {$ENDC}
  1505. FUNCTION VDSetFrameRate(ci: VideoDigitizerComponent; framesPerSecond: Fixed): VideoDigitizerError;
  1506.     {$IFC NOT GENERATINGCFM}
  1507.     INLINE $2F3C, $4, $4D, $7000, $A82A;
  1508.     {$ENDC}
  1509. FUNCTION VDGetDataRate(ci: VideoDigitizerComponent; VAR milliSecPerFrame: LONGINT; VAR framesPerSecond: Fixed; VAR bytesPerSecond: LONGINT): VideoDigitizerError;
  1510.     {$IFC NOT GENERATINGCFM}
  1511.     INLINE $2F3C, $C, $4E, $7000, $A82A;
  1512.     {$ENDC}
  1513. FUNCTION VDGetSoundInputDriver(ci: VideoDigitizerComponent; VAR soundDriverName: Str255): VideoDigitizerError;
  1514.     {$IFC NOT GENERATINGCFM}
  1515.     INLINE $2F3C, $4, $4F, $7000, $A82A;
  1516.     {$ENDC}
  1517. FUNCTION VDGetDMADepths(ci: VideoDigitizerComponent; VAR depthArray: LONGINT; VAR preferredDepth: LONGINT): VideoDigitizerError;
  1518.     {$IFC NOT GENERATINGCFM}
  1519.     INLINE $2F3C, $8, $50, $7000, $A82A;
  1520.     {$ENDC}
  1521. FUNCTION VDGetPreferredTimeScale(ci: VideoDigitizerComponent; VAR preferred: TimeScale): VideoDigitizerError;
  1522.     {$IFC NOT GENERATINGCFM}
  1523.     INLINE $2F3C, $4, $51, $7000, $A82A;
  1524.     {$ENDC}
  1525. FUNCTION VDReleaseAsyncBuffers(ci: VideoDigitizerComponent): VideoDigitizerError;
  1526.     {$IFC NOT GENERATINGCFM}
  1527.     INLINE $2F3C, 0, $52, $7000, $A82A;
  1528.     {$ENDC}
  1529. { 83 is reserved for compatibility reasons }
  1530. FUNCTION VDSetDataRate(ci: VideoDigitizerComponent; bytesPerSecond: LONGINT): VideoDigitizerError;
  1531.     {$IFC NOT GENERATINGCFM}
  1532.     INLINE $2F3C, $4, $54, $7000, $A82A;
  1533.     {$ENDC}
  1534. FUNCTION VDGetTimeCode(ci: VideoDigitizerComponent; VAR atTime: TimeRecord; timeCodeFormat: UNIV Ptr; timeCodeTime: UNIV Ptr): VideoDigitizerError;
  1535.     {$IFC NOT GENERATINGCFM}
  1536.     INLINE $2F3C, $C, $55, $7000, $A82A;
  1537.     {$ENDC}
  1538. FUNCTION VDUseSafeBuffers(ci: VideoDigitizerComponent; useSafeBuffers: BOOLEAN): VideoDigitizerError;
  1539.     {$IFC NOT GENERATINGCFM}
  1540.     INLINE $2F3C, $2, $56, $7000, $A82A;
  1541.     {$ENDC}
  1542. FUNCTION VDGetSoundInputSource(ci: VideoDigitizerComponent; videoInput: LONGINT; VAR soundInput: LONGINT): VideoDigitizerError;
  1543.     {$IFC NOT GENERATINGCFM}
  1544.     INLINE $2F3C, $8, $57, $7000, $A82A;
  1545.     {$ENDC}
  1546. FUNCTION VDGetCompressionTime(ci: VideoDigitizerComponent; compressionType: OSType; depth: INTEGER; VAR srcRect: Rect; VAR spatialQuality: CodecQ; VAR temporalQuality: CodecQ; VAR compressTime: LONGINT): VideoDigitizerError;
  1547.     {$IFC NOT GENERATINGCFM}
  1548.     INLINE $2F3C, $16, $58, $7000, $A82A;
  1549.     {$ENDC}
  1550.  
  1551. CONST
  1552.     kSelectVDGetMaxSrcRect        = $1;
  1553.     kSelectVDGetActiveSrcRect    = $2;
  1554.     kSelectVDSetDigitizerRect    = $3;
  1555.     kSelectVDGetDigitizerRect    = $4;
  1556.     kSelectVDGetVBlankRect        = $5;
  1557.     kSelectVDGetMaskPixMap        = $6;
  1558.     kSelectVDGetPlayThruDestination = $8;
  1559.     kSelectVDUseThisCLUT        = $9;
  1560.     kSelectVDSetInputGammaValue    = $A;
  1561.     kSelectVDGetInputGammaValue    = $B;
  1562.     kSelectVDSetBrightness        = $C;
  1563.     kSelectVDGetBrightness        = $D;
  1564.     kSelectVDSetContrast        = $E;
  1565.     kSelectVDSetHue                = $F;
  1566.     kSelectVDSetSharpness        = $10;
  1567.     kSelectVDSetSaturation        = $11;
  1568.     kSelectVDGetContrast        = $12;
  1569.     kSelectVDGetHue                = $13;
  1570.     kSelectVDGetSharpness        = $14;
  1571.     kSelectVDGetSaturation        = $15;
  1572.     kSelectVDGrabOneFrame        = $16;
  1573.     kSelectVDGetMaxAuxBuffer    = $17;
  1574.     kSelectVDGetDigitizerInfo    = $19;
  1575.     kSelectVDGetCurrentFlags    = $1A;
  1576.     kSelectVDSetKeyColor        = $1B;
  1577.     kSelectVDGetKeyColor        = $1C;
  1578.     kSelectVDAddKeyColor        = $1D;
  1579.     kSelectVDGetNextKeyColor    = $1E;
  1580.     kSelectVDSetKeyColorRange    = $1F;
  1581.     kSelectVDGetKeyColorRange    = $20;
  1582.     kSelectVDSetDigitizerUserInterrupt = $21;
  1583.     kSelectVDSetInputColorSpaceMode = $22;
  1584.     kSelectVDGetInputColorSpaceMode = $23;
  1585.     kSelectVDSetClipState        = $24;
  1586.     kSelectVDGetClipState        = $25;
  1587.     kSelectVDSetClipRgn            = $26;
  1588.     kSelectVDClearClipRgn        = $27;
  1589.     kSelectVDGetCLUTInUse        = $28;
  1590.     kSelectVDSetPLLFilterType    = $29;
  1591.     kSelectVDGetPLLFilterType    = $2A;
  1592.     kSelectVDGetMaskandValue    = $2B;
  1593.     kSelectVDSetMasterBlendLevel = $2C;
  1594.     kSelectVDSetPlayThruDestination = $2D;
  1595.     kSelectVDSetPlayThruOnOff    = $2E;
  1596.     kSelectVDSetFieldPreference    = $2F;
  1597.     kSelectVDGetFieldPreference    = $30;
  1598.     kSelectVDPreflightDestination = $32;
  1599.     kSelectVDPreflightGlobalRect = $33;
  1600.     kSelectVDSetPlayThruGlobalRect = $34;
  1601.     kSelectVDSetInputGammaRecord = $35;
  1602.     kSelectVDGetInputGammaRecord = $36;
  1603.     kSelectVDSetBlackLevelValue    = $37;
  1604.     kSelectVDGetBlackLevelValue    = $38;
  1605.     kSelectVDSetWhiteLevelValue    = $39;
  1606.     kSelectVDGetWhiteLevelValue    = $3A;
  1607.     kSelectVDGetVideoDefaults    = $3B;
  1608.     kSelectVDGetNumberOfInputs    = $3C;
  1609.     kSelectVDGetInputFormat        = $3D;
  1610.     kSelectVDSetInput            = $3E;
  1611.     kSelectVDGetInput            = $3F;
  1612.     kSelectVDSetInputStandard    = $40;
  1613.     kSelectVDSetupBuffers        = $41;
  1614.     kSelectVDGrabOneFrameAsync    = $42;
  1615.     kSelectVDDone                = $43;
  1616.     kSelectVDSetCompression        = $44;
  1617.     kSelectVDCompressOneFrameAsync = $45;
  1618.     kSelectVDCompressDone        = $46;
  1619.     kSelectVDReleaseCompressBuffer = $47;
  1620.     kSelectVDGetImageDescription = $48;
  1621.     kSelectVDResetCompressSequence = $49;
  1622.     kSelectVDSetCompressionOnOff = $4A;
  1623.     kSelectVDGetCompressionTypes = $4B;
  1624.     kSelectVDSetTimeBase        = $4C;
  1625.     kSelectVDSetFrameRate        = $4D;
  1626.     kSelectVDGetDataRate        = $4E;
  1627.     kSelectVDGetSoundInputDriver = $4F;
  1628.     kSelectVDGetDMADepths        = $50;
  1629.     kSelectVDGetPreferredTimeScale = $51;
  1630.     kSelectVDReleaseAsyncBuffers = $52;
  1631.     kSelectVDSetDataRate        = $54;
  1632.     kSelectVDGetTimeCode        = $55;
  1633.     kSelectVDUseSafeBuffers        = $56;
  1634.     kSelectVDGetSoundInputSource = $57;
  1635.     kSelectVDGetCompressionTime    = $58;
  1636.  
  1637.     StandardCompressionType        = 'scdi';
  1638.     StandardCompressionSubType    = 'imag';
  1639.  
  1640. TYPE
  1641.     SCModalFilterProcPtr = ProcPtr;  { FUNCTION SCModalFilter(theDialog: DialogPtr; VAR theEvent: EventRecord; VAR itemHit: INTEGER; refcon: LONGINT): BOOLEAN; }
  1642.     SCModalHookProcPtr = ProcPtr;  { FUNCTION SCModalHook(theDialog: DialogPtr; itemHit: INTEGER; params: UNIV Ptr; refcon: LONGINT): INTEGER; }
  1643.     SCModalFilterUPP = UniversalProcPtr;
  1644.     SCModalHookUPP = UniversalProcPtr;
  1645.  
  1646.  
  1647. CONST
  1648.     scListEveryCodec            = 1 * (2**(1));
  1649.     scAllowZeroFrameRate        = 1 * (2**(2));
  1650.     scAllowZeroKeyFrameRate        = 1 * (2**(3));
  1651.     scShowBestDepth                = 1 * (2**(4));
  1652.     scUseMovableModal            = 1 * (2**(5));
  1653.  
  1654. {    Possible test flags for setting test image.}
  1655.     scPreferCropping            = 1 * (2**(0));
  1656.     scPreferScaling                = 1 * (2**(1));
  1657.     scPreferScalingAndCropping    = scPreferScaling + scPreferCropping;
  1658.  
  1659. {    Dimensions of the image preview box.}
  1660.     scTestImageWidth            = 80;
  1661.     scTestImageHeight            = 80;
  1662.  
  1663. {    Possible items returned by hookProc.}
  1664.     scOKItem                    = 1;
  1665.     scCancelItem                = 2;
  1666.     scCustomItem                = 3;
  1667.  
  1668. {    Result returned when user cancelled.}
  1669.     scUserCancelled                = 1;
  1670.  
  1671.  
  1672. TYPE
  1673.     SCSpatialSettings = RECORD
  1674.         codecType:                CodecType;
  1675.         codec:                    CodecComponent;
  1676.         depth:                    INTEGER;
  1677.         spatialQuality:            CodecQ;
  1678.     END;
  1679.  
  1680.     SCTemporalSettings = RECORD
  1681.         temporalQuality:        CodecQ;
  1682.         frameRate:                Fixed;
  1683.         keyFrameRate:            LONGINT;
  1684.     END;
  1685.  
  1686.     SCDataRateSettings = RECORD
  1687.         dataRate:                LONGINT;
  1688.         frameDuration:            LONGINT;
  1689.         minSpatialQuality:        CodecQ;
  1690.         minTemporalQuality:        CodecQ;
  1691.     END;
  1692.  
  1693.     SCExtendedProcs = RECORD
  1694.         filterProc:                SCModalFilterUPP;
  1695.         hookProc:                SCModalHookUPP;
  1696.         refcon:                    LONGINT;
  1697.         customName:                Str31;
  1698.     END;
  1699.  
  1700. {    Get/SetInfo selectors}
  1701.  
  1702. CONST
  1703.     scSpatialSettingsType        = 'sptl';                        { pointer to SCSpatialSettings struct}
  1704.     scTemporalSettingsType        = 'tprl';                        { pointer to SCTemporalSettings struct}
  1705.     scDataRateSettingsType        = 'drat';                        { pointer to SCDataRateSettings struct}
  1706.     scColorTableType            = 'clut';                        { pointer to CTabHandle}
  1707.     scProgressProcType            = 'prog';                        { pointer to ProgressRecord struct}
  1708.     scExtendedProcsType            = 'xprc';                        { pointer to SCExtendedProcs struct}
  1709.     scPreferenceFlagsType        = 'pref';                        { pointer to long}
  1710.     scSettingsStateType            = 'ssta';                        { pointer to Handle}
  1711.     scSequenceIDType            = 'sequ';                        { pointer to ImageSequence}
  1712.     scWindowPositionType        = 'wndw';                        { pointer to Point}
  1713.     scCodecFlagsType            = 'cflg';                        { pointer to CodecFlags}
  1714.     scCodecSettingsType            = 'cdec';                        { pointer to Handle}
  1715.     scForceKeyValueType            = 'ksim';
  1716.  
  1717. {    scTypeNotFoundErr returned by Get/SetInfo when type cannot be found.}
  1718. {* These are Progress procedures *}
  1719.  
  1720. FUNCTION SCPositionRect(ci: ComponentInstance; VAR rp: Rect; VAR where: Point): ComponentResult;
  1721.     {$IFC NOT GENERATINGCFM}
  1722.     INLINE $2F3C, $8, $2, $7000, $A82A;
  1723.     {$ENDC}
  1724. FUNCTION SCPositionDialog(ci: ComponentInstance; id: INTEGER; VAR where: Point): ComponentResult;
  1725.     {$IFC NOT GENERATINGCFM}
  1726.     INLINE $2F3C, $6, $3, $7000, $A82A;
  1727.     {$ENDC}
  1728. FUNCTION SCSetTestImagePictHandle(ci: ComponentInstance; testPict: PicHandle; VAR testRect: Rect; testFlags: INTEGER): ComponentResult;
  1729.     {$IFC NOT GENERATINGCFM}
  1730.     INLINE $2F3C, $A, $4, $7000, $A82A;
  1731.     {$ENDC}
  1732. FUNCTION SCSetTestImagePictFile(ci: ComponentInstance; testFileRef: INTEGER; VAR testRect: Rect; testFlags: INTEGER): ComponentResult;
  1733.     {$IFC NOT GENERATINGCFM}
  1734.     INLINE $2F3C, $8, $5, $7000, $A82A;
  1735.     {$ENDC}
  1736. FUNCTION SCSetTestImagePixMap(ci: ComponentInstance; testPixMap: PixMapHandle; VAR testRect: Rect; testFlags: INTEGER): ComponentResult;
  1737.     {$IFC NOT GENERATINGCFM}
  1738.     INLINE $2F3C, $A, $6, $7000, $A82A;
  1739.     {$ENDC}
  1740. FUNCTION SCGetBestDeviceRect(ci: ComponentInstance; VAR r: Rect): ComponentResult;
  1741.     {$IFC NOT GENERATINGCFM}
  1742.     INLINE $2F3C, $4, $7, $7000, $A82A;
  1743.     {$ENDC}
  1744. FUNCTION SCRequestImageSettings(ci: ComponentInstance): ComponentResult;
  1745.     {$IFC NOT GENERATINGCFM}
  1746.     INLINE $2F3C, 0, $A, $7000, $A82A;
  1747.     {$ENDC}
  1748. FUNCTION SCCompressImage(ci: ComponentInstance; src: PixMapHandle; {CONST}VAR srcRect: Rect; VAR desc: ImageDescriptionHandle; VAR data: Handle): ComponentResult;
  1749.     {$IFC NOT GENERATINGCFM}
  1750.     INLINE $2F3C, $10, $B, $7000, $A82A;
  1751.     {$ENDC}
  1752. FUNCTION SCCompressPicture(ci: ComponentInstance; srcPicture: PicHandle; dstPicture: PicHandle): ComponentResult;
  1753.     {$IFC NOT GENERATINGCFM}
  1754.     INLINE $2F3C, $8, $C, $7000, $A82A;
  1755.     {$ENDC}
  1756. FUNCTION SCCompressPictureFile(ci: ComponentInstance; srcRefNum: INTEGER; dstRefNum: INTEGER): ComponentResult;
  1757.     {$IFC NOT GENERATINGCFM}
  1758.     INLINE $2F3C, $4, $D, $7000, $A82A;
  1759.     {$ENDC}
  1760. FUNCTION SCRequestSequenceSettings(ci: ComponentInstance): ComponentResult;
  1761.     {$IFC NOT GENERATINGCFM}
  1762.     INLINE $2F3C, 0, $E, $7000, $A82A;
  1763.     {$ENDC}
  1764. FUNCTION SCCompressSequenceBegin(ci: ComponentInstance; src: PixMapHandle; {CONST}VAR srcRect: Rect; VAR desc: ImageDescriptionHandle): ComponentResult;
  1765.     {$IFC NOT GENERATINGCFM}
  1766.     INLINE $2F3C, $C, $F, $7000, $A82A;
  1767.     {$ENDC}
  1768. FUNCTION SCCompressSequenceFrame(ci: ComponentInstance; src: PixMapHandle; {CONST}VAR srcRect: Rect; VAR data: Handle; VAR dataSize: LONGINT; VAR notSyncFlag: INTEGER): ComponentResult;
  1769.     {$IFC NOT GENERATINGCFM}
  1770.     INLINE $2F3C, $14, $10, $7000, $A82A;
  1771.     {$ENDC}
  1772. FUNCTION SCCompressSequenceEnd(ci: ComponentInstance): ComponentResult;
  1773.     {$IFC NOT GENERATINGCFM}
  1774.     INLINE $2F3C, 0, $11, $7000, $A82A;
  1775.     {$ENDC}
  1776. FUNCTION SCDefaultPictHandleSettings(ci: ComponentInstance; srcPicture: PicHandle; motion: INTEGER): ComponentResult;
  1777.     {$IFC NOT GENERATINGCFM}
  1778.     INLINE $2F3C, $6, $12, $7000, $A82A;
  1779.     {$ENDC}
  1780. FUNCTION SCDefaultPictFileSettings(ci: ComponentInstance; srcRef: INTEGER; motion: INTEGER): ComponentResult;
  1781.     {$IFC NOT GENERATINGCFM}
  1782.     INLINE $2F3C, $4, $13, $7000, $A82A;
  1783.     {$ENDC}
  1784. FUNCTION SCDefaultPixMapSettings(ci: ComponentInstance; src: PixMapHandle; motion: INTEGER): ComponentResult;
  1785.     {$IFC NOT GENERATINGCFM}
  1786.     INLINE $2F3C, $6, $14, $7000, $A82A;
  1787.     {$ENDC}
  1788. FUNCTION SCGetInfo(ci: ComponentInstance; infoType: OSType; info: UNIV Ptr): ComponentResult;
  1789.     {$IFC NOT GENERATINGCFM}
  1790.     INLINE $2F3C, $8, $15, $7000, $A82A;
  1791.     {$ENDC}
  1792. FUNCTION SCSetInfo(ci: ComponentInstance; infoType: OSType; info: UNIV Ptr): ComponentResult;
  1793.     {$IFC NOT GENERATINGCFM}
  1794.     INLINE $2F3C, $8, $16, $7000, $A82A;
  1795.     {$ENDC}
  1796. FUNCTION SCNewGWorld(ci: ComponentInstance; VAR gwp: GWorldPtr; VAR rp: Rect; flags: GWorldFlags): ComponentResult;
  1797.     {$IFC NOT GENERATINGCFM}
  1798.     INLINE $2F3C, $C, $17, $7000, $A82A;
  1799.     {$ENDC}
  1800. FUNCTION SCSetCompressFlags(ci: ComponentInstance; flags: LONGINT): ComponentResult;
  1801.     {$IFC NOT GENERATINGCFM}
  1802.     INLINE $2F3C, $4, $18, $7000, $A82A;
  1803.     {$ENDC}
  1804. FUNCTION SCGetCompressFlags(ci: ComponentInstance; VAR flags: LONGINT): ComponentResult;
  1805.     {$IFC NOT GENERATINGCFM}
  1806.     INLINE $2F3C, $4, $19, $7000, $A82A;
  1807.     {$ENDC}
  1808.  
  1809. TYPE
  1810.     SCParams = RECORD
  1811.         flags:                    LONGINT;
  1812.         theCodecType:            CodecType;
  1813.         theCodec:                CodecComponent;
  1814.         spatialQuality:            CodecQ;
  1815.         temporalQuality:        CodecQ;
  1816.         depth:                    INTEGER;
  1817.         frameRate:                Fixed;
  1818.         keyFrameRate:            LONGINT;
  1819.         reserved1:                LONGINT;
  1820.         reserved2:                LONGINT;
  1821.     END;
  1822.  
  1823.  
  1824. CONST
  1825.     scGetCompression            = 1;
  1826.     scShowMotionSettings        = 1 * (2**(0));
  1827.     scSettingsChangedItem        = -1;
  1828.  
  1829.     scCompressFlagIgnoreIdenticalFrames = 1;
  1830.  
  1831.  
  1832. FUNCTION SCGetCompressionExtended(ci: ComponentInstance; VAR params: SCParams; where: Point; filterProc: SCModalFilterUPP; hookProc: SCModalHookUPP; refcon: LONGINT; customName: StringPtr): ComponentResult;
  1833.     {$IFC NOT GENERATINGCFM}
  1834.     INLINE $2F3C, $18, $1, $7000, $A82A;
  1835.     {$ENDC}
  1836.  
  1837. CONST
  1838.     kSCPositionRectSelect        = $2;
  1839.     kSCPositionDialogSelect        = $3;
  1840.     kSCSetTestImagePictHandleSelect = $4;
  1841.     kSCSetTestImagePictFileSelect = $5;
  1842.     kSCSetTestImagePixMapSelect    = $6;
  1843.     kSCGetBestDeviceRectSelect    = $7;
  1844.     kSCRequestImageSettingsSelect = $A;
  1845.     kSCCompressImageSelect        = $B;
  1846.     kSCCompressPictureSelect    = $C;
  1847.     kSCCompressPictureFileSelect = $D;
  1848.     kSCRequestSequenceSettingsSelect = $E;
  1849.     kSCCompressSequenceBeginSelect = $F;
  1850.     kSCCompressSequenceFrameSelect = $10;
  1851.     kSCCompressSequenceEndSelect = $11;
  1852.     kSCDefaultPictHandleSettingsSelect = $12;
  1853.     kSCDefaultPictFileSettingsSelect = $13;
  1854.     kSCDefaultPixMapSettingsSelect = $14;
  1855.     kSCGetInfoSelect            = $15;
  1856.     kSCSetInfoSelect            = $16;
  1857.     kSCNewGWorldSelect            = $17;
  1858.     kSCSetCompressFlagsSelect    = $18;
  1859.     kSCGetCompressFlagsSelect    = $19;
  1860.     kSCGetCompressionExtendedSelect = $1;
  1861.  
  1862.     
  1863. TYPE
  1864.     MovieImportComponent = ComponentInstance;
  1865.     MovieExportComponent = ComponentInstance;
  1866.  
  1867.  
  1868. CONST
  1869.     MovieImportType                = 'eat ';
  1870.     MovieExportType                = 'spit';
  1871.  
  1872.     canMovieImportHandles        = 1 * (2**(0));
  1873.     canMovieImportFiles            = 1 * (2**(1));
  1874.     hasMovieImportUserInterface    = 1 * (2**(2));
  1875.     canMovieExportHandles        = 1 * (2**(3));
  1876.     canMovieExportFiles            = 1 * (2**(4));
  1877.     hasMovieExportUserInterface    = 1 * (2**(5));
  1878.     dontAutoFileMovieImport        = 1 * (2**(6));
  1879.     canMovieExportAuxDataHandle    = 1 * (2**(7));
  1880.     canMovieImportValidateHandles = 1 * (2**(8));
  1881.     canMovieImportValidateFile    = 1 * (2**(9));
  1882.     dontRegisterWithEasyOpen    = 1 * (2**(10));
  1883.     canMovieImportInPlace        = 1 * (2**(11));
  1884.     movieImportSubTypeIsFileExtension = 1 * (2**(12));
  1885.  
  1886.     kMovieImportExportOpenSelect = kComponentOpenSelect;
  1887.     kMovieImportExportCloseSelect = kComponentCloseSelect;
  1888.     kMovieImportExportCanDoSelect = kComponentCanDoSelect;
  1889.     kMovieImportExportVersionSelect = kComponentVersionSelect;
  1890.     kMovieImportExportTargetSelect = kComponentTargetSelect;
  1891.     kMovieImportHandleSelect    = 1;
  1892.     kMovieImportFileSelect        = 2;
  1893.     kMovieImportSetSampleDurationSelect = 3;
  1894.     kMovieImportSetSampleDescriptionSelect = 4;
  1895.     kMovieImportSetMediaFileSelect = 5;
  1896.     kMovieImportSetDimensionsSelect = 6;
  1897.     kMovieImportSetChunkSizeSelect = 7;
  1898.     kMovieImportSetProgressProcSelect = 8;
  1899.     kMovieImportSetAuxiliaryDataSelect = 9;
  1900.     kMovieImportSetFromScrapSelect = 10;
  1901.     kMovieImportDoUserDialogSelect = 11;
  1902.     kMovieImportSetDurationSelect = 12;
  1903.     kMovieImportGetAuxiliaryDataTypeSelect = 13;
  1904.     kMovieImportValidateSelect    = 14;
  1905.     kMovieImportGetFileTypeSelect = 15;
  1906.     kMovieExportToHandleSelect    = 128;
  1907.     kMovieExportToFileSelect    = 129;
  1908.     kMovieExportDoUserDialogSelectOBSOLETE = 130;
  1909.     kMovieExportGetAuxiliaryDataSelect = 131;
  1910.     kMovieExportSetProgressProcSelect = 132;
  1911.     kMovieExportSetSampleDescriptionSelect = 133;
  1912.     kMovieExportDoUserDialogSelect = 134;
  1913.     kMovieExportGetCreatorTypeSelect = 135;
  1914.  
  1915.     movieImportCreateTrack        = 1;
  1916.     movieImportInParallel        = 2;
  1917.     movieImportMustUseTrack        = 4;
  1918.  
  1919.     movieImportResultUsedMultipleTracks = 8;
  1920.  
  1921.     kMovieExportTextOnly        = 0;
  1922.     kMovieExportAbsoluteTime    = 1;
  1923.     kMovieExportRelativeTime    = 2;
  1924.  
  1925.  
  1926. FUNCTION MovieImportHandle(ci: MovieImportComponent; dataH: Handle; theMovie: Movie; targetTrack: Track; VAR usedTrack: Track; atTime: TimeValue; VAR addedDuration: TimeValue; inFlags: LONGINT; VAR outFlags: LONGINT): ComponentResult;
  1927.     {$IFC NOT GENERATINGCFM}
  1928.     INLINE $2F3C, $20, $1, $7000, $A82A;
  1929.     {$ENDC}
  1930. FUNCTION MovieImportFile(ci: MovieImportComponent; {CONST}VAR theFile: FSSpec; theMovie: Movie; targetTrack: Track; VAR usedTrack: Track; atTime: TimeValue; VAR addedDuration: TimeValue; inFlags: LONGINT; VAR outFlags: LONGINT): ComponentResult;
  1931.     {$IFC NOT GENERATINGCFM}
  1932.     INLINE $2F3C, $20, $2, $7000, $A82A;
  1933.     {$ENDC}
  1934. FUNCTION MovieImportSetSampleDuration(ci: MovieImportComponent; duration: TimeValue; scale: TimeScale): ComponentResult;
  1935.     {$IFC NOT GENERATINGCFM}
  1936.     INLINE $2F3C, $8, $3, $7000, $A82A;
  1937.     {$ENDC}
  1938. FUNCTION MovieImportSetSampleDescription(ci: MovieImportComponent; desc: SampleDescriptionHandle; mediaType: OSType): ComponentResult;
  1939.     {$IFC NOT GENERATINGCFM}
  1940.     INLINE $2F3C, $8, $4, $7000, $A82A;
  1941.     {$ENDC}
  1942. FUNCTION MovieImportSetMediaFile(ci: MovieImportComponent; alias: AliasHandle): ComponentResult;
  1943.     {$IFC NOT GENERATINGCFM}
  1944.     INLINE $2F3C, $4, $5, $7000, $A82A;
  1945.     {$ENDC}
  1946. FUNCTION MovieImportSetDimensions(ci: MovieImportComponent; width: Fixed; height: Fixed): ComponentResult;
  1947.     {$IFC NOT GENERATINGCFM}
  1948.     INLINE $2F3C, $8, $6, $7000, $A82A;
  1949.     {$ENDC}
  1950. FUNCTION MovieImportSetChunkSize(ci: MovieImportComponent; chunkSize: LONGINT): ComponentResult;
  1951.     {$IFC NOT GENERATINGCFM}
  1952.     INLINE $2F3C, $4, $7, $7000, $A82A;
  1953.     {$ENDC}
  1954. FUNCTION MovieImportSetProgressProc(ci: MovieImportComponent; proc: MovieProgressUPP; refcon: LONGINT): ComponentResult;
  1955.     {$IFC NOT GENERATINGCFM}
  1956.     INLINE $2F3C, $8, $8, $7000, $A82A;
  1957.     {$ENDC}
  1958. FUNCTION MovieImportSetAuxiliaryData(ci: MovieImportComponent; data: Handle; handleType: OSType): ComponentResult;
  1959.     {$IFC NOT GENERATINGCFM}
  1960.     INLINE $2F3C, $8, $9, $7000, $A82A;
  1961.     {$ENDC}
  1962. FUNCTION MovieImportSetFromScrap(ci: MovieImportComponent; fromScrap: BOOLEAN): ComponentResult;
  1963.     {$IFC NOT GENERATINGCFM}
  1964.     INLINE $2F3C, $2, $A, $7000, $A82A;
  1965.     {$ENDC}
  1966. FUNCTION MovieImportDoUserDialog(ci: MovieImportComponent; {CONST}VAR theFile: FSSpec; theData: Handle; VAR canceled: BOOLEAN): ComponentResult;
  1967.     {$IFC NOT GENERATINGCFM}
  1968.     INLINE $2F3C, $C, $B, $7000, $A82A;
  1969.     {$ENDC}
  1970. FUNCTION MovieImportSetDuration(ci: MovieImportComponent; duration: TimeValue): ComponentResult;
  1971.     {$IFC NOT GENERATINGCFM}
  1972.     INLINE $2F3C, $4, $C, $7000, $A82A;
  1973.     {$ENDC}
  1974. FUNCTION MovieImportGetAuxiliaryDataType(ci: MovieImportComponent; VAR auxType: OSType): ComponentResult;
  1975.     {$IFC NOT GENERATINGCFM}
  1976.     INLINE $2F3C, $4, $D, $7000, $A82A;
  1977.     {$ENDC}
  1978. FUNCTION MovieImportValidate(ci: MovieImportComponent; {CONST}VAR theFile: FSSpec; theData: Handle; VAR valid: BOOLEAN): ComponentResult;
  1979.     {$IFC NOT GENERATINGCFM}
  1980.     INLINE $2F3C, $C, $E, $7000, $A82A;
  1981.     {$ENDC}
  1982. FUNCTION MovieImportGetFileType(ci: MovieImportComponent; VAR fileType: OSType): ComponentResult;
  1983.     {$IFC NOT GENERATINGCFM}
  1984.     INLINE $2F3C, $4, $F, $7000, $A82A;
  1985.     {$ENDC}
  1986. FUNCTION MovieExportToHandle(ci: MovieExportComponent; dataH: Handle; theMovie: Movie; onlyThisTrack: Track; startTime: TimeValue; duration: TimeValue): ComponentResult;
  1987.     {$IFC NOT GENERATINGCFM}
  1988.     INLINE $2F3C, $14, $80, $7000, $A82A;
  1989.     {$ENDC}
  1990. FUNCTION MovieExportToFile(ci: MovieExportComponent; {CONST}VAR theFile: FSSpec; theMovie: Movie; onlyThisTrack: Track; startTime: TimeValue; duration: TimeValue): ComponentResult;
  1991.     {$IFC NOT GENERATINGCFM}
  1992.     INLINE $2F3C, $14, $81, $7000, $A82A;
  1993.     {$ENDC}
  1994. FUNCTION MovieExportGetAuxiliaryData(ci: MovieExportComponent; dataH: Handle; VAR handleType: OSType): ComponentResult;
  1995.     {$IFC NOT GENERATINGCFM}
  1996.     INLINE $2F3C, $8, $83, $7000, $A82A;
  1997.     {$ENDC}
  1998. FUNCTION MovieExportSetProgressProc(ci: MovieExportComponent; proc: MovieProgressUPP; refcon: LONGINT): ComponentResult;
  1999.     {$IFC NOT GENERATINGCFM}
  2000.     INLINE $2F3C, $8, $84, $7000, $A82A;
  2001.     {$ENDC}
  2002. FUNCTION MovieExportSetSampleDescription(ci: MovieExportComponent; desc: SampleDescriptionHandle; mediaType: OSType): ComponentResult;
  2003.     {$IFC NOT GENERATINGCFM}
  2004.     INLINE $2F3C, $8, $85, $7000, $A82A;
  2005.     {$ENDC}
  2006. FUNCTION MovieExportDoUserDialog(ci: MovieExportComponent; theMovie: Movie; onlyThisTrack: Track; startTime: TimeValue; duration: TimeValue; VAR canceled: BOOLEAN): ComponentResult;
  2007.     {$IFC NOT GENERATINGCFM}
  2008.     INLINE $2F3C, $14, $86, $7000, $A82A;
  2009.     {$ENDC}
  2010. FUNCTION MovieExportGetCreatorType(ci: MovieExportComponent; VAR creator: OSType): ComponentResult;
  2011.     {$IFC NOT GENERATINGCFM}
  2012.     INLINE $2F3C, $4, $87, $7000, $A82A;
  2013.     {$ENDC}
  2014. { Text Export Display Info data structure}
  2015.  
  2016. TYPE
  2017.     TextDisplayData = RECORD
  2018.         displayFlags:            LONGINT;
  2019.         textJustification:        LONGINT;
  2020.         bgColor:                RGBColor;
  2021.         textBox:                Rect;
  2022.         beginHilite:            INTEGER;
  2023.         endHilite:                INTEGER;
  2024.         hiliteColor:            RGBColor;
  2025.         doHiliteColor:            BOOLEAN;
  2026.         filler:                    SInt8;
  2027.         scrollDelayDur:            TimeValue;
  2028.         dropShadowOffset:        Point;
  2029.         dropShadowTransparency:    INTEGER;
  2030.     END;
  2031.  
  2032.     TextExportComponent = ComponentInstance;
  2033.  
  2034.  
  2035. FUNCTION TextExportGetDisplayData(ci: TextExportComponent; VAR textDisplay: TextDisplayData): ComponentResult;
  2036.     {$IFC NOT GENERATINGCFM}
  2037.     INLINE $2F3C, $4, $100, $7000, $A82A;
  2038.     {$ENDC}
  2039. FUNCTION TextExportGetTimeFraction(ci: TextExportComponent; VAR movieTimeFraction: LONGINT): ComponentResult;
  2040.     {$IFC NOT GENERATINGCFM}
  2041.     INLINE $2F3C, $4, $101, $7000, $A82A;
  2042.     {$ENDC}
  2043. FUNCTION TextExportSetTimeFraction(ci: TextExportComponent; movieTimeFraction: LONGINT): ComponentResult;
  2044.     {$IFC NOT GENERATINGCFM}
  2045.     INLINE $2F3C, $4, $102, $7000, $A82A;
  2046.     {$ENDC}
  2047. FUNCTION TextExportGetSettings(ci: TextExportComponent; VAR setting: LONGINT): ComponentResult;
  2048.     {$IFC NOT GENERATINGCFM}
  2049.     INLINE $2F3C, $4, $103, $7000, $A82A;
  2050.     {$ENDC}
  2051. FUNCTION TextExportSetSettings(ci: TextExportComponent; setting: LONGINT): ComponentResult;
  2052.     {$IFC NOT GENERATINGCFM}
  2053.     INLINE $2F3C, $4, $104, $7000, $A82A;
  2054.     {$ENDC}
  2055. {**************
  2056.  
  2057.     File Preview Components
  2058.  
  2059. **************}
  2060.     
  2061. TYPE
  2062.     pnotComponent = ComponentInstance;
  2063.  
  2064.  
  2065. CONST
  2066.     pnotComponentWantsEvents    = 1;
  2067.     pnotComponentNeedsNoCache    = 2;
  2068.  
  2069.     kPreviewOpenSelector        = 0;
  2070.     kPreviewCloseSelector        = -1;
  2071.     kPreviewCanDoSelector        = -2;
  2072.     kPreviewVersionSelector        = -3;
  2073.     kPreviewShowDataSelector    = 1;
  2074.     kPreviewMakePreviewSelector    = 2;
  2075.     kPreviewMakePreviewReferenceSelector = 3;
  2076.     kPreviewEventSelector        = 4;
  2077.  
  2078.     ShowFilePreviewComponentType = 'pnot';
  2079.     CreateFilePreviewComponentType = 'pmak';
  2080.  
  2081.  
  2082. FUNCTION PreviewShowData(p: pnotComponent; dataType: OSType; data: Handle; {CONST}VAR inHere: Rect): ComponentResult;
  2083.     {$IFC NOT GENERATINGCFM}
  2084.     INLINE $2F3C, $C, $1, $7000, $A82A;
  2085.     {$ENDC}
  2086. FUNCTION PreviewMakePreview(p: pnotComponent; VAR previewType: OSType; VAR previewResult: Handle; {CONST}VAR sourceFile: FSSpec; progress: ICMProgressProcRecordPtr): ComponentResult;
  2087.     {$IFC NOT GENERATINGCFM}
  2088.     INLINE $2F3C, $10, $2, $7000, $A82A;
  2089.     {$ENDC}
  2090. FUNCTION PreviewMakePreviewReference(p: pnotComponent; VAR previewType: OSType; VAR resID: INTEGER; {CONST}VAR sourceFile: FSSpec): ComponentResult;
  2091.     {$IFC NOT GENERATINGCFM}
  2092.     INLINE $2F3C, $C, $3, $7000, $A82A;
  2093.     {$ENDC}
  2094. FUNCTION PreviewEvent(p: pnotComponent; VAR e: EventRecord; VAR handledEvent: BOOLEAN): ComponentResult;
  2095.     {$IFC NOT GENERATINGCFM}
  2096.     INLINE $2F3C, $8, $4, $7000, $A82A;
  2097.     {$ENDC}
  2098. TYPE
  2099.     DataHCompletionProcPtr = ProcPtr;  { PROCEDURE DataHCompletion(request: Ptr; refcon: LONGINT; err: OSErr); }
  2100.     DataHCompletionUPP = UniversalProcPtr;
  2101.  
  2102.  
  2103. CONST
  2104.     kDataHCanRead                = 1 * (2**(0));
  2105.     kDataHSpecialRead            = 1 * (2**(1));
  2106.     kDataHSpecialReadFile        = 1 * (2**(2));
  2107.     kDataHCanWrite                = 1 * (2**(3));
  2108.     kDataHSpecialWrite            = 1 * (2**(4));
  2109.     kDataHSpecialWriteFile        = 1 * (2**(5));
  2110.     kDataHCanStreamingWrite        = 1 * (2**(6));
  2111.     kDataHMustCheckDataRef        = 1 * (2**(7));
  2112.  
  2113.  
  2114. TYPE
  2115.     DataHVolumeListRecord = RECORD
  2116.         vRefNum:                INTEGER;
  2117.         flags:                    LONGINT;
  2118.     END;
  2119.  
  2120.     DataHVolumeListPtr = ^DataHVolumeListRecord;
  2121.  
  2122.     DataHVolumeList = ^DataHVolumeListPtr;
  2123.  
  2124.  
  2125. CONST
  2126.     kDataHExtendedSchedule        = 'xtnd';
  2127.  
  2128.  
  2129. TYPE
  2130.     DataHScheduleRecord = RECORD
  2131.         timeNeededBy:            TimeRecord;
  2132.         extendedID:                LONGINT;                                { always is kDataHExtendedSchedule}
  2133.         extendedVers:            LONGINT;                                { always set to 0}
  2134.         priority:                Fixed;                                    { 100.0 or more means must have. lower numbers…}
  2135.     END;
  2136.  
  2137.     DataHSchedulePtr = ^DataHScheduleRecord;
  2138.  
  2139.  
  2140. FUNCTION DataHGetData(dh: DataHandler; h: Handle; hOffset: LONGINT; offset: LONGINT; size: LONGINT): ComponentResult;
  2141.     {$IFC NOT GENERATINGCFM}
  2142.     INLINE $2F3C, $10, $2, $7000, $A82A;
  2143.     {$ENDC}
  2144. FUNCTION DataHPutData(dh: DataHandler; h: Handle; hOffset: LONGINT; VAR offset: LONGINT; size: LONGINT): ComponentResult;
  2145.     {$IFC NOT GENERATINGCFM}
  2146.     INLINE $2F3C, $10, $3, $7000, $A82A;
  2147.     {$ENDC}
  2148. FUNCTION DataHFlushData(dh: DataHandler): ComponentResult;
  2149.     {$IFC NOT GENERATINGCFM}
  2150.     INLINE $2F3C, 0, $4, $7000, $A82A;
  2151.     {$ENDC}
  2152. FUNCTION DataHOpenForWrite(dh: DataHandler): ComponentResult;
  2153.     {$IFC NOT GENERATINGCFM}
  2154.     INLINE $2F3C, 0, $5, $7000, $A82A;
  2155.     {$ENDC}
  2156. FUNCTION DataHCloseForWrite(dh: DataHandler): ComponentResult;
  2157.     {$IFC NOT GENERATINGCFM}
  2158.     INLINE $2F3C, 0, $6, $7000, $A82A;
  2159.     {$ENDC}
  2160. FUNCTION DataHOpenForRead(dh: DataHandler): ComponentResult;
  2161.     {$IFC NOT GENERATINGCFM}
  2162.     INLINE $2F3C, 0, $8, $7000, $A82A;
  2163.     {$ENDC}
  2164. FUNCTION DataHCloseForRead(dh: DataHandler): ComponentResult;
  2165.     {$IFC NOT GENERATINGCFM}
  2166.     INLINE $2F3C, 0, $9, $7000, $A82A;
  2167.     {$ENDC}
  2168. FUNCTION DataHSetDataRef(dh: DataHandler; dataRef: Handle): ComponentResult;
  2169.     {$IFC NOT GENERATINGCFM}
  2170.     INLINE $2F3C, $4, $A, $7000, $A82A;
  2171.     {$ENDC}
  2172. FUNCTION DataHGetDataRef(dh: DataHandler; VAR dataRef: Handle): ComponentResult;
  2173.     {$IFC NOT GENERATINGCFM}
  2174.     INLINE $2F3C, $4, $B, $7000, $A82A;
  2175.     {$ENDC}
  2176. FUNCTION DataHCompareDataRef(dh: DataHandler; dataRef: Handle; VAR equal: BOOLEAN): ComponentResult;
  2177.     {$IFC NOT GENERATINGCFM}
  2178.     INLINE $2F3C, $8, $C, $7000, $A82A;
  2179.     {$ENDC}
  2180. FUNCTION DataHTask(dh: DataHandler): ComponentResult;
  2181.     {$IFC NOT GENERATINGCFM}
  2182.     INLINE $2F3C, 0, $D, $7000, $A82A;
  2183.     {$ENDC}
  2184. FUNCTION DataHScheduleData(dh: DataHandler; PlaceToPutDataPtr: Ptr; FileOffset: LONGINT; DataSize: LONGINT; RefCon: LONGINT; scheduleRec: DataHSchedulePtr; CompletionRtn: DataHCompletionUPP): ComponentResult;
  2185.     {$IFC NOT GENERATINGCFM}
  2186.     INLINE $2F3C, $18, $E, $7000, $A82A;
  2187.     {$ENDC}
  2188. FUNCTION DataHFinishData(dh: DataHandler; PlaceToPutDataPtr: Ptr; Cancel: BOOLEAN): ComponentResult;
  2189.     {$IFC NOT GENERATINGCFM}
  2190.     INLINE $2F3C, $6, $F, $7000, $A82A;
  2191.     {$ENDC}
  2192. FUNCTION DataHFlushCache(dh: DataHandler): ComponentResult;
  2193.     {$IFC NOT GENERATINGCFM}
  2194.     INLINE $2F3C, 0, $10, $7000, $A82A;
  2195.     {$ENDC}
  2196. FUNCTION DataHResolveDataRef(dh: DataHandler; theDataRef: Handle; VAR wasChanged: BOOLEAN; userInterfaceAllowed: BOOLEAN): ComponentResult;
  2197.     {$IFC NOT GENERATINGCFM}
  2198.     INLINE $2F3C, $A, $11, $7000, $A82A;
  2199.     {$ENDC}
  2200. FUNCTION DataHGetFileSize(dh: DataHandler; VAR fileSize: LONGINT): ComponentResult;
  2201.     {$IFC NOT GENERATINGCFM}
  2202.     INLINE $2F3C, $4, $12, $7000, $A82A;
  2203.     {$ENDC}
  2204. FUNCTION DataHCanUseDataRef(dh: DataHandler; dataRef: Handle; VAR useFlags: LONGINT): ComponentResult;
  2205.     {$IFC NOT GENERATINGCFM}
  2206.     INLINE $2F3C, $8, $13, $7000, $A82A;
  2207.     {$ENDC}
  2208. FUNCTION DataHGetVolumeList(dh: DataHandler; VAR volumeList: DataHVolumeList): ComponentResult;
  2209.     {$IFC NOT GENERATINGCFM}
  2210.     INLINE $2F3C, $4, $14, $7000, $A82A;
  2211.     {$ENDC}
  2212. FUNCTION DataHWrite(dh: DataHandler; data: Ptr; offset: LONGINT; size: LONGINT; completion: DataHCompletionUPP; refCon: LONGINT): ComponentResult;
  2213.     {$IFC NOT GENERATINGCFM}
  2214.     INLINE $2F3C, $14, $15, $7000, $A82A;
  2215.     {$ENDC}
  2216. FUNCTION DataHPreextend(dh: DataHandler; maxToAdd: LONGINT; VAR spaceAdded: LONGINT): ComponentResult;
  2217.     {$IFC NOT GENERATINGCFM}
  2218.     INLINE $2F3C, $8, $16, $7000, $A82A;
  2219.     {$ENDC}
  2220. FUNCTION DataHSetFileSize(dh: DataHandler; fileSize: LONGINT): ComponentResult;
  2221.     {$IFC NOT GENERATINGCFM}
  2222.     INLINE $2F3C, $4, $17, $7000, $A82A;
  2223.     {$ENDC}
  2224. FUNCTION DataHGetFreeSpace(dh: DataHandler; VAR freeSize: LONGINT): ComponentResult;
  2225.     {$IFC NOT GENERATINGCFM}
  2226.     INLINE $2F3C, $4, $18, $7000, $A82A;
  2227.     {$ENDC}
  2228. FUNCTION DataHCreateFile(dh: DataHandler; creator: OSType; deleteExisting: BOOLEAN): ComponentResult;
  2229.     {$IFC NOT GENERATINGCFM}
  2230.     INLINE $2F3C, $6, $19, $7000, $A82A;
  2231.     {$ENDC}
  2232. FUNCTION DataHGetPreferredBlockSize(dh: DataHandler; VAR blockSize: LONGINT): ComponentResult;
  2233.     {$IFC NOT GENERATINGCFM}
  2234.     INLINE $2F3C, $4, $1A, $7000, $A82A;
  2235.     {$ENDC}
  2236. FUNCTION DataHGetDeviceIndex(dh: DataHandler; VAR deviceIndex: LONGINT): ComponentResult;
  2237.     {$IFC NOT GENERATINGCFM}
  2238.     INLINE $2F3C, $4, $1B, $7000, $A82A;
  2239.     {$ENDC}
  2240. FUNCTION DataHIsStreamingDataHandler(dh: DataHandler; VAR yes: BOOLEAN): ComponentResult;
  2241.     {$IFC NOT GENERATINGCFM}
  2242.     INLINE $2F3C, $4, $1C, $7000, $A82A;
  2243.     {$ENDC}
  2244. FUNCTION DataHGetDataInBuffer(dh: DataHandler; startOffset: LONGINT; VAR size: LONGINT): ComponentResult;
  2245.     {$IFC NOT GENERATINGCFM}
  2246.     INLINE $2F3C, $8, $1D, $7000, $A82A;
  2247.     {$ENDC}
  2248. FUNCTION DataHGetScheduleAheadTime(dh: DataHandler; VAR millisecs: LONGINT): ComponentResult;
  2249.     {$IFC NOT GENERATINGCFM}
  2250.     INLINE $2F3C, $4, $1E, $7000, $A82A;
  2251.     {$ENDC}
  2252. FUNCTION DataHSetCacheSizeLimit(dh: DataHandler; cacheSizeLimit: Size): ComponentResult;
  2253.     {$IFC NOT GENERATINGCFM}
  2254.     INLINE $2F3C, $4, $1F, $7000, $A82A;
  2255.     {$ENDC}
  2256. FUNCTION DataHGetCacheSizeLimit(dh: DataHandler; VAR cacheSizeLimit: Size): ComponentResult;
  2257.     {$IFC NOT GENERATINGCFM}
  2258.     INLINE $2F3C, $4, $20, $7000, $A82A;
  2259.     {$ENDC}
  2260. FUNCTION DataHGetMovie(dh: DataHandler; VAR theMovie: Movie; VAR id: INTEGER): ComponentResult;
  2261.     {$IFC NOT GENERATINGCFM}
  2262.     INLINE $2F3C, $8, $21, $7000, $A82A;
  2263.     {$ENDC}
  2264. FUNCTION DataHAddMovie(dh: DataHandler; theMovie: Movie; VAR id: INTEGER): ComponentResult;
  2265.     {$IFC NOT GENERATINGCFM}
  2266.     INLINE $2F3C, $8, $22, $7000, $A82A;
  2267.     {$ENDC}
  2268. FUNCTION DataHUpdateMovie(dh: DataHandler; theMovie: Movie; id: INTEGER): ComponentResult;
  2269.     {$IFC NOT GENERATINGCFM}
  2270.     INLINE $2F3C, $6, $23, $7000, $A82A;
  2271.     {$ENDC}
  2272. FUNCTION DataHDoesBuffer(dh: DataHandler; VAR buffersReads: BOOLEAN; VAR buffersWrites: BOOLEAN): ComponentResult;
  2273.     {$IFC NOT GENERATINGCFM}
  2274.     INLINE $2F3C, $8, $24, $7000, $A82A;
  2275.     {$ENDC}
  2276. FUNCTION DataHPlaybackHints(dh: DataHandler; flags: LONGINT; minFileOffset: LONGINT; maxFileOffset: LONGINT; bytesPerSecond: LONGINT): ComponentResult;
  2277.     {$IFC NOT GENERATINGCFM}
  2278.     INLINE $2F3C, $10, $103, $7000, $A82A;
  2279.     {$ENDC}
  2280.  
  2281. CONST
  2282.     kDataHGetDataSelect            = $2;
  2283.     kDataHPutDataSelect            = $3;
  2284.     kDataHFlushDataSelect        = $4;
  2285.     kDataHOpenForWriteSelect    = $5;
  2286.     kDataHCloseForWriteSelect    = $6;
  2287.     kDataHOpenForReadSelect        = $8;
  2288.     kDataHCloseForReadSelect    = $9;
  2289.     kDataHSetDataRefSelect        = $A;
  2290.     kDataHGetDataRefSelect        = $B;
  2291.     kDataHCompareDataRefSelect    = $C;
  2292.     kDataHTaskSelect            = $D;
  2293.     kDataHScheduleDataSelect    = $E;
  2294.     kDataHFinishDataSelect        = $F;
  2295.     kDataHFlushCacheSelect        = $10;
  2296.     kDataHResolveDataRefSelect    = $11;
  2297.     kDataHGetFileSizeSelect        = $12;
  2298.     kDataHCanUseDataRefSelect    = $13;
  2299.     kDataHGetVolumeListSelect    = $14;
  2300.     kDataHWriteSelect            = $15;
  2301.     kDataHPreextendSelect        = $16;
  2302.     kDataHSetFileSizeSelect        = $17;
  2303.     kDataHGetFreeSpaceSelect    = $18;
  2304.     kDataHCreateFileSelect        = $19;
  2305.     kDataHGetPreferredBlockSizeSelect = $1A;
  2306.     kDataHGetDeviceIndexSelect    = $1B;
  2307.     kDataHIsStreamingDataHandlerSelect = $1C;
  2308.     kDataHGetDataInBufferSelect    = $1D;
  2309.     kDataHGetScheduleAheadTimeSelect = $1E;
  2310.     kDataHSetCacheSizeLimitSelect = $1F;
  2311.     kDataHGetCacheSizeLimitSelect = $20;
  2312.     kDataHGetMovieSelect        = $21;
  2313.     kDataHAddMovieSelect        = $22;
  2314.     kDataHUpdateMovieSelect        = $23;
  2315.     kDataHDoesBufferSelect        = $24;
  2316.     kDataHPlaybackHintsSelect    = $103;
  2317.  
  2318. {
  2319.     AtomicInstrument
  2320.          ToneDescription
  2321.         [NoteRequestInfo]
  2322.         [KnobList]
  2323.         [SampleInfo [1..m]] 
  2324.              SampeDescription (identifies corresponding SampleData)
  2325.             [KnobList]
  2326.         [SampleData [1..n]]
  2327.         [InstrumentInfo]
  2328.             [Pict]
  2329.             [Author]
  2330.             [Copyright]
  2331.             [Other]
  2332. }
  2333.     kaiToneDescType                = 'tone';
  2334.     kaiKnobListType                = 'knbl';
  2335.     kaiSampleInfoType            = 'sinf';
  2336.     kaiSampleDescType            = 'sdsc';
  2337.     kaiInstInfoType                = 'iinf';
  2338.     kaiPictType                    = 'pict';
  2339.     kaiWriterType                = '©wrt';
  2340.     kaiCopyrightType            = '©cpy';
  2341.     kaiOtherStrType                = 'str ';
  2342.     kaiSampleDataType            = 'sdat';
  2343.     kaiNoteRequestInfoType        = 'ntrq';
  2344.  
  2345.  
  2346. TYPE
  2347.     InstKnobRec = RECORD
  2348.         number:                    LONGINT;
  2349.         value:                    LONGINT;
  2350.     END;
  2351.  
  2352.  
  2353. CONST
  2354.     kInstKnobMissingUnknown        = 0;
  2355.     kInstKnobMissingDefault        = 1 * (2**(0));
  2356.  
  2357.  
  2358. TYPE
  2359.     InstKnobList = RECORD
  2360.         knobCount:                LONGINT;
  2361.         knobFlags:                LONGINT;
  2362.         knob:                    ARRAY [0..0] OF InstKnobRec;
  2363.     END;
  2364.  
  2365.  
  2366. CONST
  2367.     loopTypeNormal                = 0;
  2368.     loopTypeAlternating            = 1;                            { back & forth}
  2369.  
  2370.     instSamplePreProcessFlag    = 1 * (2**(0));
  2371.  
  2372.  
  2373. TYPE
  2374.     InstSampleDescRec = RECORD
  2375.         dataFormat:                OSType;
  2376.         numChannels:            INTEGER;
  2377.         sampleSize:                INTEGER;
  2378.         sampleRate:                UnsignedFixed;
  2379.         sampleDataID:            INTEGER;
  2380.         offset:                    LONGINT;                                { offset within SampleData - this could be just for internal use}
  2381.         numSamples:                LONGINT;                                { this could also just be for internal use, we'll see}
  2382.         loopType:                LONGINT;
  2383.         loopStart:                LONGINT;
  2384.         loopEnd:                LONGINT;
  2385.         pitchNormal:            LONGINT;
  2386.         pitchLow:                LONGINT;
  2387.         pitchHigh:                LONGINT;
  2388.     END;
  2389.  
  2390.     AtomicInstrument = Handle;
  2391.  
  2392.     AtomicInstrumentPtr = Ptr;
  2393.  
  2394.  
  2395. CONST
  2396.     kMusicComponentType            = 'musi';
  2397.  
  2398.     kSoftSynthType                = 'ss  ';
  2399.     kGMSynthType                = 'gm  ';
  2400.  
  2401.     
  2402. TYPE
  2403.     MusicComponent = ComponentInstance;
  2404.  
  2405. { MusicSynthesizerFlags}
  2406.  
  2407. CONST
  2408.     kSynthesizerDynamicVoice    = 1;                            { can assign voices on the fly (else, polyphony is very important }
  2409.     kSynthesizerUsesMIDIPort    = 2;                            { must be patched through MIDI Manager }
  2410.     kSynthesizerMicrotone        = 4;                            { can play microtonal scales }
  2411.     kSynthesizerLimitedMicrotone = 8;                            { can play microtones, but only on 1-voice parts }
  2412.     kSynthesizerMixedDrums        = 16;                            { any part can play drum parts, total = instrument parts }
  2413.     kSynthesizerSoftware        = 32;                            { implemented in main CPU software == uses cpu cycles }
  2414.     kSynthesizerHardware        = 64;                            { is a hardware device (such as nubus, or maybe DSP?) }
  2415.     kSynthesizerDynamicChannel    = 128;                            { can move any part to any channel or disable each part. (else we assume it lives on all channels in masks) }
  2416.     kSynthesizerHogsSystemChannel = 256;                        { can be channelwise dynamic, but always responds on its system channel }
  2417.     kSynthesizerEditsMainChannel = 512;                            { can only twiddle knobs on the main system channel }
  2418.     kSynthesizerSlowSetPart        = 1024;                            { SetPart() and SetPartInstrumentNumber() calls do not have rapid response, may glitch notes }
  2419.     kSynthesizerNeedsSystemChannel = 2048;                        { The user need not be queried for system channel, example: GM synth }
  2420.     kSynthesizerCanBeMono        = 4096;                            { Synthesizer can be configured either mono or poly }
  2421.     kSynthesizerGMSuperset        = 8192;                            { synth is a GM device, with some voices beyond the GM set. (if set, kSynthesizerGM must also be set }
  2422.     kSynthesizerGM                = 16384;                        { synth is a GM device }
  2423.  
  2424. {
  2425.  * Note that these controller numbers
  2426.  * are _not_ identical to the MIDI controller numbers.
  2427.  * These are _signed_ 8.8 values, and the LSB's are
  2428.  * always sent to a MIDI device. Controllers 32-63 are
  2429.  * reserved (for MIDI, they are LSB's for 0-31, but we
  2430.  * always send both).
  2431.  *
  2432.  * The full range, therefore, is -128.00 to 127.7f.
  2433.  *
  2434.  * _Excepting_ _volume_, all controls default to zero.
  2435.  *
  2436.  * Pitch bend is specified in fractional semitones! No
  2437.  * more "pitch bend range" nonsense. You can bend as far
  2438.  * as you want, any time you want.
  2439.  }
  2440.     kControllerModulationWheel    = 1;
  2441.     kControllerBreath            = 2;
  2442.     kControllerFoot                = 4;
  2443.     kControllerPortamentoTime    = 5;                            { portamento on/off is omitted, 0 time = 'off' }
  2444.     kControllerVolume            = 7;
  2445.     kControllerBalance            = 8;
  2446.     kControllerPan                = 10;                            { 0 - "default", 1 - n: positioned in output 1-n (incl fractions) }
  2447.     kControllerExpression        = 11;
  2448.     kControllerLever1            = 16;                            { general purpose controllers }
  2449.     kControllerLever2            = 17;                            { general purpose controllers }
  2450.     kControllerLever3            = 18;                            { general purpose controllers }
  2451.     kControllerLever4            = 19;                            { general purpose controllers }
  2452.     kControllerLever5            = 80;                            { general purpose controllers }
  2453.     kControllerLever6            = 81;                            { general purpose controllers }
  2454.     kControllerLever7            = 82;                            { general purpose controllers }
  2455.     kControllerLever8            = 83;                            { general purpose controllers }
  2456.     kControllerPitchBend        = 32;                            { positive & negative semitones, with 7 bits fraction }
  2457.     kControllerAfterTouch        = 33;                            { aka channel pressure }
  2458.     kControllerSustain            = 64;                            { boolean - positive for on, 0 or negative off }
  2459.     kControllerSostenuto        = 66;                            { boolean }
  2460.     kControllerSoftPedal        = 67;                            { boolean }
  2461.     kControllerReverb            = 91;
  2462.     kControllerTremolo            = 92;
  2463.     kControllerChorus            = 93;
  2464.     kControllerCeleste            = 94;
  2465.     kControllerPhaser            = 95;
  2466.  
  2467.     kControllerMaximum            = $7FFF;                        { +01111111.11111111 }
  2468.     kControllerMinimum            = $8000;                        { -10000000.00000000 }
  2469.  
  2470.  
  2471. TYPE
  2472.     SynthesizerDescription = RECORD
  2473.         synthesizerType:        OSType;                                    { synthesizer type (must be same as component subtype) }
  2474.         name:                    Str31;                                    { text name of synthesizer type }
  2475.         flags:                    LONGINT;                                { from the above enum }
  2476.         voiceCount:                LONGINT;                                { maximum polyphony }
  2477.         partCount:                LONGINT;                                { maximum multi-timbrality (and midi channels) }
  2478.         instrumentCount:        LONGINT;                                { non gm, built in (rom) instruments only }
  2479.         modifiableInstrumentCount: LONGINT;                                { plus n-more are user modifiable }
  2480.         channelMask:            LONGINT;                                { (midi device only) which channels device always uses }
  2481.         drumPartCount:            LONGINT;                                { maximum multi-timbrality of drum parts }
  2482.         drumCount:                LONGINT;                                { non gm, built in (rom) drumkits only }
  2483.         modifiableDrumCount:    LONGINT;                                { plus n-more are user modifiable }
  2484.         drumChannelMask:        LONGINT;                                { (midi device only) which channels device always uses }
  2485.         outputCount:            LONGINT;                                { number of audio outputs (usually two) }
  2486.         latency:                LONGINT;                                { response time in µSec }
  2487.         controllers:            ARRAY [0..3] OF LONGINT;                { array of 128 bits }
  2488.         gmInstruments:            ARRAY [0..3] OF LONGINT;                { array of 128 bits }
  2489.         gmDrums:                ARRAY [0..3] OF LONGINT;                { array of 128 bits }
  2490.     END;
  2491.  
  2492.  
  2493. CONST
  2494.     kVoiceCountDynamic            = -1;                            { constant to use to specify dynamic voicing }
  2495.  
  2496.  
  2497. TYPE
  2498.     ToneDescription = RECORD
  2499.         synthesizerType:        OSType;                                    { synthesizer type }
  2500.         synthesizerName:        Str31;                                    { name of instantiation of synth }
  2501.         instrumentName:            Str31;                                    { preferred name for human use }
  2502.         instrumentNumber:        LONGINT;                                { inst-number used if synth-name matches }
  2503.         gmNumber:                LONGINT;                                { Best matching general MIDI number }
  2504.     END;
  2505.  
  2506.  
  2507. CONST
  2508.     kFirstDrumkit                = 16384;                        { (first value is "no drum". instrument numbers from 16384->16384+128 are drumkits, and for GM they are _defined_ drumkits! }
  2509.     kLastDrumkit                = 0+(kFirstDrumkit + 128);
  2510.  
  2511. { InstrumentMatch}
  2512.     kInstrumentMatchSynthesizerType = 1;
  2513.     kInstrumentMatchSynthesizerName = 2;
  2514.     kInstrumentMatchName        = 4;
  2515.     kInstrumentMatchNumber        = 8;
  2516.     kInstrumentMatchGMNumber    = 16;
  2517.  
  2518. { KnobFlags}
  2519.     kKnobRealtime                = 1;                            { Knob can be changed interactively as part of a sequence (ie knob can be changed at interrupt time) }
  2520.     kKnobNextNote                = 2;                            { Knob only takes effect on the next note played }
  2521.     kKnobAction                    = 4;                            { setting the knob does something immediate }
  2522.     kKnobNotInstrument            = 8;                            { indicates that the knob isn't in the instrument handle }
  2523.     kKnobAffectsOthers            = 16;                            { other knobs will change value from this one }
  2524.     kKnobInterruptUnsafe        = 32;                            { only alter this knob from foreground task time (may access toolbox) }
  2525.     kKnobMinorGroupStart        = 64;                            { knob is first in some logical subgroup of knobs }
  2526.     kKnobGroupStart                = 128;                            { knob is first in some logical group of knobs }
  2527.     kKnobFixedPoint8            = 1024;
  2528.     kKnobFixedPoint16            = 2048;
  2529. { One of these may be used at a time. }
  2530.     kKnobTypeNumber                = 0 * (2**(12));
  2531.     kKnobTypeGroupName            = 1 * (2**(12));                { "knob" is really a group name for display purposes }
  2532.     kKnobTypeBoolean            = 2 * (2**(12));                { if range is greater than 1, its a multi-checkbox field }
  2533.     kKnobTypeNote                = 3 * (2**(12));                { knob range is equivalent to MIDI keys }
  2534.     kKnobTypePan                = 4 * (2**(12));                { range goes left/right (lose this? ) }
  2535.     kKnobTypeInstrument            = 5 * (2**(12));                { knob value = reference to another instrument number }
  2536.     kKnobTypeSetting            = 6 * (2**(12));                { knob value is 1 of n different things (eg, fm algorithms) popup menu }
  2537.     kKnobTypeMilliseconds        = 7 * (2**(12));                { knob is a millisecond time range }
  2538.     kKnobTypePercentage            = 8 * (2**(12));                { knob range is displayed as a Percentage }
  2539.     kKnobTypeHertz                = 9 * (2**(12));                { knob represents frequency }
  2540.  
  2541.     kUnknownKnobValue            = $7FFFFFFF;                    { a knob with this value means, we don't know it. }
  2542.     kDefaultKnobValue            = $7FFFFFFE;                    { used to SET a knob to its default value. }
  2543.  
  2544.  
  2545. TYPE
  2546.     KnobDescription = RECORD
  2547.         name:                    Str31;
  2548.         lowValue:                LONGINT;
  2549.         highValue:                LONGINT;
  2550.         defaultValue:            LONGINT;                                { a default instrument is made of all default values }
  2551.         flags:                    LONGINT;
  2552.         knobID:                    LONGINT;
  2553.     END;
  2554.  
  2555.     InstrumentAboutInfo = RECORD
  2556.         p:                        PicHandle;
  2557.         author:                    Str255;
  2558.         copyright:                Str255;
  2559.         other:                    Str255;
  2560.     END;
  2561.  
  2562.  
  2563. CONST
  2564.     kMusicPacketPortLost        = 1;                            { received when application loses the default input port }
  2565.     kMusicPacketPortFound        = 2;                            { received when application gets it back out from under someone else's claim }
  2566.     kMusicPacketTimeGap            = 3;                            { data[0] = number of milliseconds to keep the MIDI line silent }
  2567.  
  2568.  
  2569. TYPE
  2570.     MusicMIDIPacket = RECORD
  2571.         length:                    INTEGER;
  2572.         reserved:                LONGINT;                                { if length zero, then reserved = above enum }
  2573.         data:                    PACKED ARRAY [0..248] OF SInt8;
  2574.     END;
  2575.  
  2576.     MusicMIDISendProcPtr = ProcPtr;  { FUNCTION MusicMIDISend(self: MusicComponent; refCon: LONGINT; VAR mmp: MusicMIDIPacket): ComponentResult; }
  2577.     MusicMIDISendUPP = UniversalProcPtr;
  2578.  
  2579.     MusicMIDIReadHookProcPtr = ProcPtr;  { FUNCTION MusicMIDIReadHook(VAR mp: MusicMIDIPacket; myRefCon: LONGINT): ComponentResult; }
  2580.     MusicMIDIReadHookUPP = UniversalProcPtr;
  2581.  
  2582.  
  2583. CONST
  2584.     kMusicFirstSelect            = 0;
  2585.     kMusicGetDescriptionSelect    = 1;
  2586.     kMusicGetPartSelect            = 2;
  2587.     kMusicSetPartSelect            = 3;
  2588.     kMusicSetPartInstrumentNumberSelect = 4;
  2589.     kMusicGetPartInstrumentNumberSelect = 5;
  2590.     kMusicStorePartInstrumentSelect = 6;
  2591.     kMusicDummyOne                = 7;
  2592.     kMusicDummyTwo                = 8;
  2593.     kMusicGetPartAtomicInstrumentSelect = 9;
  2594.     kMusicSetPartAtomicInstrumentSelect = 10;
  2595.     kMusicDummyThree            = 11;
  2596.     kMusicDummyFour                = 12;
  2597.     kMusicGetInstrumentKnobDescriptionObsoleteSelect = 13;
  2598.     kMusicGetDrumKnobDescriptionObsoleteSelect = 14;
  2599.     kMusicGetKnobDescriptionObsoleteSelect = 15;
  2600.     kMusicGetPartKnobSelect        = 16;
  2601.     kMusicSetPartKnobSelect        = 17;
  2602.     kMusicGetKnobSelect            = 18;
  2603.     kMusicSetKnobSelect            = 19;
  2604.     kMusicGetPartNameSelect        = 20;
  2605.     kMusicSetPartNameSelect        = 21;
  2606.     kMusicFindToneSelect        = 22;
  2607.     kMusicPlayNoteSelect        = 23;
  2608.     kMusicResetPartSelect        = 24;
  2609.     kMusicSetPartControllerSelect = 25;
  2610.     kMusicGetPartControllerSelect = 26;
  2611.     kMusicGetMIDIProcSelect        = 27;
  2612.     kMusicSetMIDIProcSelect        = 28;
  2613.     kMusicGetInstrumentNamesSelect = 29;
  2614.     kMusicGetDrumNamesSelect    = 30;
  2615.     kMusicGetMasterTuneSelect    = 31;
  2616.     kMusicSetMasterTuneSelect    = 32;
  2617.     kMusicDummyFive                = 33;
  2618.     kMusicGetInstrumentAboutInfoSelect = 34;
  2619.     kMusicGetDeviceConnectionSelect = 35;
  2620.     kMusicUseDeviceConnectionSelect = 36;
  2621.     kMusicGetInstrumentKnobSettingsSelect = 37;
  2622.     kMusicGetMIDIPortsSelect    = 38;
  2623.     kMusicSendMIDISelect        = 39;
  2624.     kMusicReceiveMIDISelect        = 40;
  2625.     kMusicStartOfflineSelect    = 41;
  2626.     kMusicSetOfflineTimeToSelect = 42;
  2627.     kMusicGetInstrumentKnobDescriptionSelect = 43;
  2628.     kMusicGetDrumKnobDescriptionSelect = 44;
  2629.     kMusicGetKnobDescriptionSelect = 45;
  2630.  
  2631.     notImplementedMusicErr        = 0+($80000000 + ((-2100 - 1)));
  2632.     cantSendToSynthesizerErr    = 0+($80000000 + ((-2100 - 2)));
  2633.     cantReceiveFromSynthesizerErr = 0+($80000000 + ((-2100 - 3)));
  2634.     illegalVoiceAllocationErr    = 0+($80000000 + ((-2100 - 4)));
  2635.     illegalPartErr                = 0+($80000000 + ((-2100 - 5)));
  2636.     illegalChannelErr            = 0+($80000000 + ((-2100 - 6)));
  2637.     illegalKnobErr                = 0+($80000000 + ((-2100 - 7)));
  2638.     illegalKnobValueErr            = 0+($80000000 + ((-2100 - 8)));
  2639.     illegalInstrumentErr        = 0+($80000000 + ((-2100 - 9)));
  2640.     illegalControllerErr        = 0+($80000000 + ((-2100 - 10)));
  2641.     midiManagerAbsentErr        = 0+($80000000 + ((-2100 - 11)));
  2642.     synthesizerNotRespondingErr    = 0+($80000000 + ((-2100 - 12)));
  2643.     synthesizerErr                = 0+($80000000 + ((-2100 - 13)));
  2644.     illegalNoteChannelErr        = 0+($80000000 + ((-2100 - 14)));
  2645.     noteChannelNotAllocatedErr    = 0+($80000000 + ((-2100 - 15)));
  2646.     tunePlayerFullErr            = 0+($80000000 + ((-2100 - 16)));
  2647.     tuneParseErr                = 0+($80000000 + ((-2100 - 17)));
  2648.  
  2649.     kGMType                        = 'gm  ';
  2650.  
  2651. {-----------------------------------------
  2652.     Capabilities and Voice Allocation
  2653. -----------------------------------------}
  2654.  
  2655. FUNCTION MusicGetPart(mc: MusicComponent; part: LONGINT; VAR midiChannel: LONGINT; VAR polyphony: LONGINT): ComponentResult;
  2656.     {$IFC NOT GENERATINGCFM}
  2657.     INLINE $2F3C, $C, $2, $7000, $A82A;
  2658.     {$ENDC}
  2659. FUNCTION MusicSetPart(mc: MusicComponent; part: LONGINT; midiChannel: LONGINT; polyphony: LONGINT): ComponentResult;
  2660.     {$IFC NOT GENERATINGCFM}
  2661.     INLINE $2F3C, $C, $3, $7000, $A82A;
  2662.     {$ENDC}
  2663. FUNCTION MusicGetDescription(mc: MusicComponent; VAR sd: SynthesizerDescription): ComponentResult;
  2664.     {$IFC NOT GENERATINGCFM}
  2665.     INLINE $2F3C, $4, $1, $7000, $A82A;
  2666.     {$ENDC}
  2667. FUNCTION MusicGetInstrumentAboutInfo(mc: MusicComponent; part: LONGINT; VAR iai: InstrumentAboutInfo): ComponentResult;
  2668.     {$IFC NOT GENERATINGCFM}
  2669.     INLINE $2F3C, $8, $22, $7000, $A82A;
  2670.     {$ENDC}
  2671. {-----------------------------------------
  2672.     Instrument Loading and Storing
  2673. -----------------------------------------}
  2674. FUNCTION MusicSetPartInstrumentNumber(mc: MusicComponent; part: LONGINT; instrumentNumber: LONGINT): ComponentResult;
  2675.     {$IFC NOT GENERATINGCFM}
  2676.     INLINE $2F3C, $8, $4, $7000, $A82A;
  2677.     {$ENDC}
  2678. FUNCTION MusicGetPartInstrumentNumber(mc: MusicComponent; part: LONGINT): ComponentResult;
  2679.     {$IFC NOT GENERATINGCFM}
  2680.     INLINE $2F3C, $4, $5, $7000, $A82A;
  2681.     {$ENDC}
  2682. FUNCTION MusicStorePartInstrument(mc: MusicComponent; part: LONGINT; instrumentNumber: LONGINT): ComponentResult;
  2683.     {$IFC NOT GENERATINGCFM}
  2684.     INLINE $2F3C, $8, $6, $7000, $A82A;
  2685.     {$ENDC}
  2686.  
  2687. CONST
  2688.     getAtomicInstGetOriginalSamples = 1 * (2**(0));
  2689.     getAtomicInstGetExpandedSamples = 1 * (2**(1));
  2690.  
  2691.  
  2692. FUNCTION MusicGetPartAtomicInstrument(mc: MusicComponent; part: LONGINT; VAR ai: AtomicInstrument; flags: LONGINT): ComponentResult;
  2693.     {$IFC NOT GENERATINGCFM}
  2694.     INLINE $2F3C, $C, $9, $7000, $A82A;
  2695.     {$ENDC}
  2696.  
  2697. CONST
  2698.     setAtomicInstKeepOriginalSamples = 1 * (2**(0));
  2699.     setAtomicInstNeverPurgeSamples = 1 * (2**(1));                { if set self-contained inst stays until app goes away }
  2700.  
  2701.  
  2702. FUNCTION MusicSetPartAtomicInstrument(mc: MusicComponent; part: LONGINT; aiP: AtomicInstrumentPtr; flags: LONGINT): ComponentResult;
  2703.     {$IFC NOT GENERATINGCFM}
  2704.     INLINE $2F3C, $C, $A, $7000, $A82A;
  2705.     {$ENDC}
  2706. {-----------------------------------------
  2707.     Instrument Knobs
  2708. -----------------------------------------}
  2709. FUNCTION MusicGetInstrumentKnobDescription(mc: MusicComponent; knobIndex: LONGINT; VAR mkd: KnobDescription): ComponentResult;
  2710.     {$IFC NOT GENERATINGCFM}
  2711.     INLINE $2F3C, $8, $2B, $7000, $A82A;
  2712.     {$ENDC}
  2713. FUNCTION MusicGetDrumKnobDescription(mc: MusicComponent; knobIndex: LONGINT; VAR mkd: KnobDescription): ComponentResult;
  2714.     {$IFC NOT GENERATINGCFM}
  2715.     INLINE $2F3C, $8, $2C, $7000, $A82A;
  2716.     {$ENDC}
  2717. FUNCTION MusicGetInstrumentKnobSettings(mc: MusicComponent; knobIndex: LONGINT; VAR settingsNames: Handle; VAR settingsCategoryLasts: Handle; VAR settingsCategoryNames: Handle): ComponentResult;
  2718.     {$IFC NOT GENERATINGCFM}
  2719.     INLINE $2F3C, $10, $25, $7000, $A82A;
  2720.     {$ENDC}
  2721. FUNCTION MusicGetPartKnob(mc: MusicComponent; part: LONGINT; knobID: LONGINT): ComponentResult;
  2722.     {$IFC NOT GENERATINGCFM}
  2723.     INLINE $2F3C, $8, $10, $7000, $A82A;
  2724.     {$ENDC}
  2725. FUNCTION MusicSetPartKnob(mc: MusicComponent; part: LONGINT; knobID: LONGINT; knobValue: LONGINT): ComponentResult;
  2726.     {$IFC NOT GENERATINGCFM}
  2727.     INLINE $2F3C, $C, $11, $7000, $A82A;
  2728.     {$ENDC}
  2729. {-----------------------------------------
  2730.     Synthesizer Knobs
  2731. -----------------------------------------}
  2732. FUNCTION MusicGetKnobDescription(mc: MusicComponent; knobIndex: LONGINT; VAR mkd: KnobDescription): ComponentResult;
  2733.     {$IFC NOT GENERATINGCFM}
  2734.     INLINE $2F3C, $8, $2D, $7000, $A82A;
  2735.     {$ENDC}
  2736. FUNCTION MusicGetKnob(mc: MusicComponent; knobID: LONGINT): ComponentResult;
  2737.     {$IFC NOT GENERATINGCFM}
  2738.     INLINE $2F3C, $4, $12, $7000, $A82A;
  2739.     {$ENDC}
  2740. FUNCTION MusicSetKnob(mc: MusicComponent; knobID: LONGINT; knobValue: LONGINT): ComponentResult;
  2741.     {$IFC NOT GENERATINGCFM}
  2742.     INLINE $2F3C, $8, $13, $7000, $A82A;
  2743.     {$ENDC}
  2744. FUNCTION MusicSetMasterTune(mc: MusicComponent; masterTune: LONGINT): ComponentResult;
  2745.     {$IFC NOT GENERATINGCFM}
  2746.     INLINE $2F3C, $4, $20, $7000, $A82A;
  2747.     {$ENDC}
  2748. FUNCTION MusicGetMasterTune(mc: MusicComponent): ComponentResult;
  2749.     {$IFC NOT GENERATINGCFM}
  2750.     INLINE $2F3C, 0, $1F, $7000, $A82A;
  2751.     {$ENDC}
  2752. {-----------------------------------------
  2753.     Names of Instruments
  2754. -----------------------------------------}
  2755. FUNCTION MusicGetPartName(mc: MusicComponent; part: LONGINT; VAR name: Str31): ComponentResult;
  2756.     {$IFC NOT GENERATINGCFM}
  2757.     INLINE $2F3C, $8, $14, $7000, $A82A;
  2758.     {$ENDC}
  2759. FUNCTION MusicSetPartName(mc: MusicComponent; part: LONGINT; VAR name: Str31): ComponentResult;
  2760.     {$IFC NOT GENERATINGCFM}
  2761.     INLINE $2F3C, $8, $15, $7000, $A82A;
  2762.     {$ENDC}
  2763. FUNCTION MusicFindTone(mc: MusicComponent; VAR td: ToneDescription; VAR instrumentNumber: LONGINT; VAR fit: LONGINT): ComponentResult;
  2764.     {$IFC NOT GENERATINGCFM}
  2765.     INLINE $2F3C, $C, $16, $7000, $A82A;
  2766.     {$ENDC}
  2767.  
  2768. CONST
  2769.     kInstrumentNamesModifiable    = 1;
  2770.     kInstrumentNamesBoth        = 2;
  2771.  
  2772.  
  2773. FUNCTION MusicGetInstrumentNames(mc: MusicComponent; modifiableInstruments: LONGINT; VAR instrumentNames: Handle; VAR instrumentCategoryLasts: Handle; VAR instrumentCategoryNames: Handle): ComponentResult;
  2774.     {$IFC NOT GENERATINGCFM}
  2775.     INLINE $2F3C, $10, $1D, $7000, $A82A;
  2776.     {$ENDC}
  2777. FUNCTION MusicGetDrumNames(mc: MusicComponent; modifiableInstruments: LONGINT; VAR instrumentNumbers: Handle; VAR instrumentNames: Handle): ComponentResult;
  2778.     {$IFC NOT GENERATINGCFM}
  2779.     INLINE $2F3C, $C, $1E, $7000, $A82A;
  2780.     {$ENDC}
  2781. {-----------------------------------------
  2782.     Realtime Actions
  2783. -----------------------------------------}
  2784. FUNCTION MusicPlayNote(mc: MusicComponent; part: LONGINT; pitch: LONGINT; velocity: LONGINT): ComponentResult;
  2785.     {$IFC NOT GENERATINGCFM}
  2786.     INLINE $2F3C, $C, $17, $7000, $A82A;
  2787.     {$ENDC}
  2788. FUNCTION MusicResetPart(mc: MusicComponent; part: LONGINT): ComponentResult;
  2789.     {$IFC NOT GENERATINGCFM}
  2790.     INLINE $2F3C, $4, $18, $7000, $A82A;
  2791.     {$ENDC}
  2792. FUNCTION MusicSetPartController(mc: MusicComponent; part: LONGINT; controllerNumber: LONGINT; controllerValue: LONGINT): ComponentResult;
  2793.     {$IFC NOT GENERATINGCFM}
  2794.     INLINE $2F3C, $C, $19, $7000, $A82A;
  2795.     {$ENDC}
  2796. FUNCTION MusicGetPartController(mc: MusicComponent; part: LONGINT; controllerNumber: LONGINT): ComponentResult;
  2797.     {$IFC NOT GENERATINGCFM}
  2798.     INLINE $2F3C, $8, $1A, $7000, $A82A;
  2799.     {$ENDC}
  2800. {-----------------------------------------
  2801.     Finding the Hardware
  2802. -----------------------------------------}
  2803. FUNCTION MusicGetMIDIProc(mc: MusicComponent; VAR midiSendProc: MusicMIDISendUPP; VAR refCon: LONGINT): ComponentResult;
  2804.     {$IFC NOT GENERATINGCFM}
  2805.     INLINE $2F3C, $8, $1B, $7000, $A82A;
  2806.     {$ENDC}
  2807. FUNCTION MusicSetMIDIProc(mc: MusicComponent; midiSendProc: MusicMIDISendUPP; refCon: LONGINT): ComponentResult;
  2808.     {$IFC NOT GENERATINGCFM}
  2809.     INLINE $2F3C, $8, $1C, $7000, $A82A;
  2810.     {$ENDC}
  2811. FUNCTION MusicGetDeviceConnection(mc: MusicComponent; index: LONGINT; VAR id1: LONGINT; VAR id2: LONGINT): ComponentResult;
  2812.     {$IFC NOT GENERATINGCFM}
  2813.     INLINE $2F3C, $C, $23, $7000, $A82A;
  2814.     {$ENDC}
  2815. FUNCTION MusicUseDeviceConnection(mc: MusicComponent; id1: LONGINT; id2: LONGINT): ComponentResult;
  2816.     {$IFC NOT GENERATINGCFM}
  2817.     INLINE $2F3C, $8, $24, $7000, $A82A;
  2818.     {$ENDC}
  2819. {-----------------------------------------
  2820.     Component Based MIDIs
  2821.     (very optional calls)
  2822. -----------------------------------------}
  2823. FUNCTION MusicGetMIDIPorts(mc: MusicComponent; VAR inputPortCount: LONGINT; VAR outputPortCount: LONGINT): ComponentResult;
  2824.     {$IFC NOT GENERATINGCFM}
  2825.     INLINE $2F3C, $8, $26, $7000, $A82A;
  2826.     {$ENDC}
  2827. FUNCTION MusicSendMIDI(mc: MusicComponent; portIndex: LONGINT; VAR mp: MusicMIDIPacket): ComponentResult;
  2828.     {$IFC NOT GENERATINGCFM}
  2829.     INLINE $2F3C, $8, $27, $7000, $A82A;
  2830.     {$ENDC}
  2831. FUNCTION MusicReceiveMIDI(mc: MusicComponent; readHook: MusicMIDIReadHookUPP; refCon: LONGINT): ComponentResult;
  2832.     {$IFC NOT GENERATINGCFM}
  2833.     INLINE $2F3C, $8, $28, $7000, $A82A;
  2834.     {$ENDC}
  2835. {-----------------------------------------
  2836.     Non-RealTime Support
  2837. -----------------------------------------}
  2838. TYPE
  2839.     MusicOfflineDataProcPtr = ProcPtr;  { FUNCTION MusicOfflineData(SoundData: Ptr; numBytes: LONGINT; myRefCon: LONGINT): ComponentResult; }
  2840.     MusicOfflineDataUPP = UniversalProcPtr;
  2841.  
  2842.     OfflineSampleType = RECORD
  2843.         numChannels:            LONGINT;                                {number of channels,  ie mono = 1}
  2844.         sampleRate:                UnsignedFixed;                            {sample rate in Apples Fixed point representation}
  2845.         sampleSize:                INTEGER;                                {number of bits in sample}
  2846.     END;
  2847.  
  2848.  
  2849. FUNCTION MusicStartOffline(mc: MusicComponent; VAR numChannels: LONGINT; VAR sampleRate: UnsignedFixed; VAR sampleSize: INTEGER; dataProc: MusicOfflineDataUPP; dataProcRefCon: LONGINT): ComponentResult;
  2850.     {$IFC NOT GENERATINGCFM}
  2851.     INLINE $2F3C, $14, $29, $7000, $A82A;
  2852.     {$ENDC}
  2853. FUNCTION MusicSetOfflineTimeTo(mc: MusicComponent; newTimeStamp: LONGINT): ComponentResult;
  2854.     {$IFC NOT GENERATINGCFM}
  2855.     INLINE $2F3C, $4, $2A, $7000, $A82A;
  2856.     {$ENDC}
  2857. {-----------------------------------------
  2858.     Obsolete calls
  2859. -----------------------------------------}
  2860. FUNCTION MusicGetInstrumentKnobDescriptionObsolete(mc: MusicComponent; knobIndex: LONGINT; mkd: UNIV Ptr): ComponentResult;
  2861.     {$IFC NOT GENERATINGCFM}
  2862.     INLINE $2F3C, $8, $D, $7000, $A82A;
  2863.     {$ENDC}
  2864. FUNCTION MusicGetDrumKnobDescriptionObsolete(mc: MusicComponent; knobIndex: LONGINT; mkd: UNIV Ptr): ComponentResult;
  2865.     {$IFC NOT GENERATINGCFM}
  2866.     INLINE $2F3C, $8, $E, $7000, $A82A;
  2867.     {$ENDC}
  2868. FUNCTION MusicGetKnobDescriptionObsolete(mc: MusicComponent; knobIndex: LONGINT; mkd: UNIV Ptr): ComponentResult;
  2869.     {$IFC NOT GENERATINGCFM}
  2870.     INLINE $2F3C, $8, $F, $7000, $A82A;
  2871.     {$ENDC}
  2872.  
  2873. CONST
  2874.     kInstrumentGetIndSelect        = 1;
  2875.     kInstrumentDisposeSelect    = 2;
  2876.     kInstrumentFindToneSelect    = 3;
  2877.     kInstrumentObsolete1        = 4;
  2878.     kInstrumentOpenResFileSelect = 5;
  2879.     kInstrumentCloseResFileSelect = 6;
  2880.     kInstrumentLast                = 7;
  2881.  
  2882.  
  2883. FUNCTION InstrumentGetInd(inst: ComponentInstance; index: LONGINT; VAR atomicInst: AtomicInstrument): ComponentResult;
  2884.     {$IFC NOT GENERATINGCFM}
  2885.     INLINE $2F3C, $8, $1, $7000, $A82A;
  2886.     {$ENDC}
  2887. FUNCTION InstrumentDispose(inst: ComponentInstance; atomicInst: AtomicInstrument): ComponentResult;
  2888.     {$IFC NOT GENERATINGCFM}
  2889.     INLINE $2F3C, $4, $2, $7000, $A82A;
  2890.     {$ENDC}
  2891. FUNCTION InstrumentFindTone(inst: ComponentInstance; VAR td: ToneDescription): ComponentResult;
  2892.     {$IFC NOT GENERATINGCFM}
  2893.     INLINE $2F3C, $4, $3, $7000, $A82A;
  2894.     {$ENDC}
  2895. { Mask bit for returned value by InstrumentFind.}
  2896. {$SETC kExactMatch := 0x20000}
  2897. {$SETC kRecommendedSubstitute := 0x10000}
  2898. {$SETC kQualityField := 0xFF000000}
  2899. {$SETC kRoland8BitQuality := 0x05000000}
  2900. FUNCTION InstrumentOpenResFile(inst: ComponentInstance; index: LONGINT; VAR resRefNum: INTEGER; VAR instResID: INTEGER): ComponentResult;
  2901.     {$IFC NOT GENERATINGCFM}
  2902.     INLINE $2F3C, $C, $5, $7000, $A82A;
  2903.     {$ENDC}
  2904. FUNCTION InstrumentCloseResFile(inst: ComponentInstance; resRefNum: INTEGER): ComponentResult;
  2905.     {$IFC NOT GENERATINGCFM}
  2906.     INLINE $2F3C, $2, $6, $7000, $A82A;
  2907.     {$ENDC}
  2908. {--------------------------
  2909.     Types
  2910. --------------------------}
  2911.     
  2912. TYPE
  2913.     NoteChannel = Ptr;
  2914.  
  2915.  
  2916. CONST
  2917.     kSynthesizerConnectionMono    = 1;                            { if set, and synth can be mono/poly, then the partCount channels from the system channel are hogged }
  2918.     kSynthesizerConnectionMMgr    = 2;                            { this connection imported from the MIDI Mgr }
  2919.     kSynthesizerConnectionOMS    = 4;                            { this connection imported from OMS }
  2920.     kSynthesizerConnectionQT    = 8;                            { this connection is a QuickTime-only port }
  2921.  
  2922. { used for MIDI device only }
  2923.  
  2924. TYPE
  2925.     SynthesizerConnections = RECORD
  2926.         clientID:                OSType;
  2927.         inputPortID:            OSType;                                    { terminology death: this port is used to SEND to the midi synth }
  2928.         outputPortID:            OSType;                                    { terminology death: this port receives from a keyboard or other control device }
  2929.         midiChannel:            LONGINT;                                { The system channel; others are configurable (or the nubus slot number) }
  2930.         flags:                    LONGINT;
  2931.         unique:                    LONGINT;                                { unique id may be used instead of index, to getinfo and unregister calls }
  2932.         reserved1:                LONGINT;                                { should be zero }
  2933.         reserved2:                LONGINT;                                { should be zero }
  2934.     END;
  2935.  
  2936.     QTMIDIPort = RECORD
  2937.         portConnections:        SynthesizerConnections;
  2938.         portName:                Str63;
  2939.     END;
  2940.  
  2941. {$SETC kNoteRequestNoGM := 1}
  2942. {$SETC kNoteRequestNoSynthType := 2}
  2943.     NoteRequestInfo = RECORD
  2944.         flags:                    SInt8;                                    { 1: dont accept GM match, 2: dont accept same-synth-type match }
  2945.         reserved:                SInt8;                                    { must be zero }
  2946.         polyphony:                INTEGER;                                { Maximum number of voices }
  2947.         typicalPolyphony:        Fixed;                                    { Hint for level mixing }
  2948.     END;
  2949.  
  2950.     NoteRequest = RECORD
  2951.         info:                    NoteRequestInfo;
  2952.         tone:                    ToneDescription;
  2953.     END;
  2954.  
  2955.  
  2956. CONST
  2957.     kNAFirstSelector            = -7;
  2958.     kNATargetSelect                = -6;
  2959.     kNARegisterSelect            = -5;
  2960.     kNAVersionSelect            = -4;
  2961.     kNACanDoSelect                = -3;
  2962.     kNACloseSelect                = -2;
  2963.     kNAOpenSelect                = -1;
  2964.     kNARegisterMusicDeviceSelect = 0;
  2965.     kNAUnregisterMusicDeviceSelect = 1;
  2966.     kNAGetRegisteredMusicDeviceSelect = 2;
  2967.     kNASaveMusicConfigurationSelect = 3;
  2968.     kNANewNoteChannelSelect        = 4;
  2969.     kNADisposeNoteChannelSelect    = 5;
  2970.     kNAGetNoteChannelInfoSelect    = 6;
  2971.     kNAPrerollNoteChannelSelect    = 7;
  2972.     kNAUnrollNoteChannelSelect    = 8;
  2973.     kNAEngageNoteChannelSelect    = 9;
  2974.     kNADisengageNoteChannelSelect = 10;
  2975.     kNASetNoteChannelVolumeSelect = 11;
  2976.     kNAResetNoteChannelSelect    = 12;
  2977.     kNAPlayNoteSelect            = 13;
  2978.     kNASetControllerSelect        = 14;
  2979.     kNASetKnobSelect            = 15;
  2980.     kNAFindNoteChannelToneSelect = 16;
  2981.     kNASetInstrumentNumberSelect = 17;
  2982.     kNAPickInstrumentSelect        = 18;
  2983.     kNAPickArrangementSelect    = 19;
  2984.     kNAGetStatusBlockSelect        = 20;
  2985.     kNASetDefaultMIDIInputSelect = 21;
  2986.     kNAGetDefaultMIDIInputSelect = 22;
  2987.     kNAGetNoteChannelStateSelect = 23;
  2988.     kNASetNoteChannelStateSelect = 24;
  2989.     kNAUseDefaultMIDIInputSelect = 25;
  2990.     kNALoseDefaultMIDIInputSelect = 26;
  2991.     kNAStuffToneDescriptionSelect = 27;
  2992.     kNACopyrightDialogSelect    = 28;
  2993.     kNADummyOneSelect            = 29;
  2994.     kNADummyTwoSelect            = 30;
  2995.     kNAGetIndNoteChannelSelect    = 31;
  2996.     kNAPlayNote2Select            = 32;
  2997.     kNAGetMIDIPortsSelect        = 33;
  2998.     kNAGetNoteRequestSelect        = 34;
  2999.     kNASendMIDISelect            = 35;
  3000.     kNAPickEditInstrumentSelect    = 36;
  3001.     kNANewNoteChannelFromInstrumentSelect = 37;
  3002.     kNASetAtomicInstrumentSelect = 38;
  3003.     kNALastSelector                = 39;
  3004.  
  3005.     
  3006. TYPE
  3007.     NoteAllocator = ComponentInstance;
  3008.  
  3009.  
  3010. CONST
  3011.     kPickDontMix                = 1;                            { dont mix instruments with drum sounds }
  3012.     kPickSameSynth                = 2;                            { only allow the same device that went in, to come out }
  3013.     kPickUserInsts                = 4;                            { show user insts in addition to ROM voices }
  3014.     kPickEditAllowEdit            = 8;                            { lets user switch over to edit mode }
  3015.     kPickEditAllowPick            = 16;                            { lets the user switch over to pick mode }
  3016.     kPickEditSynthGlobal        = 32;                            { edit the global knobs of the synth }
  3017.     kPickEditControllers        = 64;                            { edit the controllers of the notechannel }
  3018.  
  3019.     kNoteAllocatorType            = 'nota';
  3020.  
  3021. {--------------------------------
  3022.     Note Allocator Prototypes
  3023. --------------------------------}
  3024. {
  3025.  * System Configuration
  3026.  }
  3027.  
  3028. FUNCTION NARegisterMusicDevice(na: NoteAllocator; synthType: OSType; VAR name: Str31; VAR connections: SynthesizerConnections): ComponentResult;
  3029.     {$IFC NOT GENERATINGCFM}
  3030.     INLINE $2F3C, $C, 0, $7000, $A82A;
  3031.     {$ENDC}
  3032. FUNCTION NAUnregisterMusicDevice(na: NoteAllocator; index: LONGINT): ComponentResult;
  3033.     {$IFC NOT GENERATINGCFM}
  3034.     INLINE $2F3C, $4, $1, $7000, $A82A;
  3035.     {$ENDC}
  3036. FUNCTION NAGetRegisteredMusicDevice(na: NoteAllocator; index: LONGINT; VAR synthType: OSType; VAR name: Str31; VAR connections: SynthesizerConnections; VAR mc: MusicComponent): ComponentResult;
  3037.     {$IFC NOT GENERATINGCFM}
  3038.     INLINE $2F3C, $14, $2, $7000, $A82A;
  3039.     {$ENDC}
  3040. FUNCTION NASetDefaultMIDIInput(na: NoteAllocator; VAR sc: SynthesizerConnections): ComponentResult;
  3041.     {$IFC NOT GENERATINGCFM}
  3042.     INLINE $2F3C, $4, $15, $7000, $A82A;
  3043.     {$ENDC}
  3044. FUNCTION NAGetDefaultMIDIInput(na: NoteAllocator; VAR sc: SynthesizerConnections): ComponentResult;
  3045.     {$IFC NOT GENERATINGCFM}
  3046.     INLINE $2F3C, $4, $16, $7000, $A82A;
  3047.     {$ENDC}
  3048. FUNCTION NASaveMusicConfiguration(na: NoteAllocator): ComponentResult;
  3049.     {$IFC NOT GENERATINGCFM}
  3050.     INLINE $2F3C, 0, $3, $7000, $A82A;
  3051.     {$ENDC}
  3052. {
  3053.  * Allocation
  3054.  }
  3055. FUNCTION NANewNoteChannel(na: NoteAllocator; VAR noteRequest: NoteRequest; VAR outChannel: NoteChannel): ComponentResult;
  3056.     {$IFC NOT GENERATINGCFM}
  3057.     INLINE $2F3C, $8, $4, $7000, $A82A;
  3058.     {$ENDC}
  3059. FUNCTION NANewNoteChannelFromInstrument(na: NoteAllocator; instrument: AtomicInstrumentPtr; VAR outChannel: NoteChannel): ComponentResult;
  3060.     {$IFC NOT GENERATINGCFM}
  3061.     INLINE $2F3C, $8, $25, $7000, $A82A;
  3062.     {$ENDC}
  3063. FUNCTION NADisposeNoteChannel(na: NoteAllocator; noteChannel: NoteChannel): ComponentResult;
  3064.     {$IFC NOT GENERATINGCFM}
  3065.     INLINE $2F3C, $4, $5, $7000, $A82A;
  3066.     {$ENDC}
  3067. FUNCTION NAGetNoteChannelInfo(na: NoteAllocator; noteChannel: NoteChannel; VAR index: LONGINT; VAR part: LONGINT): ComponentResult;
  3068.     {$IFC NOT GENERATINGCFM}
  3069.     INLINE $2F3C, $C, $6, $7000, $A82A;
  3070.     {$ENDC}
  3071. FUNCTION NAGetNoteRequest(na: NoteAllocator; noteChannel: NoteChannel; VAR nrOut: NoteRequest): ComponentResult;
  3072.     {$IFC NOT GENERATINGCFM}
  3073.     INLINE $2F3C, $8, $22, $7000, $A82A;
  3074.     {$ENDC}
  3075. FUNCTION NAUseDefaultMIDIInput(na: NoteAllocator; readHook: MusicMIDIReadHookUPP; refCon: LONGINT; flags: LONGINT): ComponentResult;
  3076.     {$IFC NOT GENERATINGCFM}
  3077.     INLINE $2F3C, $C, $19, $7000, $A82A;
  3078.     {$ENDC}
  3079. FUNCTION NALoseDefaultMIDIInput(na: NoteAllocator): ComponentResult;
  3080.     {$IFC NOT GENERATINGCFM}
  3081.     INLINE $2F3C, 0, $1A, $7000, $A82A;
  3082.     {$ENDC}
  3083. FUNCTION NAGetMIDIPorts(na: NoteAllocator; VAR inputPorts: Handle; VAR outputPorts: Handle): ComponentResult;
  3084.     {$IFC NOT GENERATINGCFM}
  3085.     INLINE $2F3C, $8, $21, $7000, $A82A;
  3086.     {$ENDC}
  3087. {
  3088.  * Setup
  3089.  }
  3090. FUNCTION NAPrerollNoteChannel(na: NoteAllocator; noteChannel: NoteChannel): ComponentResult;
  3091.     {$IFC NOT GENERATINGCFM}
  3092.     INLINE $2F3C, $4, $7, $7000, $A82A;
  3093.     {$ENDC}
  3094. FUNCTION NAUnrollNoteChannel(na: NoteAllocator; noteChannel: NoteChannel): ComponentResult;
  3095.     {$IFC NOT GENERATINGCFM}
  3096.     INLINE $2F3C, $4, $8, $7000, $A82A;
  3097.     {$ENDC}
  3098. FUNCTION NAEngageNoteChannel(na: NoteAllocator; noteChannel: NoteChannel): ComponentResult;
  3099.     {$IFC NOT GENERATINGCFM}
  3100.     INLINE $2F3C, $4, $9, $7000, $A82A;
  3101.     {$ENDC}
  3102. FUNCTION NADisengageNoteChannel(na: NoteAllocator; noteChannel: NoteChannel; silenceNotes: LONGINT): ComponentResult;
  3103.     {$IFC NOT GENERATINGCFM}
  3104.     INLINE $2F3C, $8, $A, $7000, $A82A;
  3105.     {$ENDC}
  3106. FUNCTION NAGetNoteChannelState(na: NoteAllocator; noteChannel: NoteChannel; instrumentNumber: LONGINT; t: TimeValue; VAR state: Handle): ComponentResult;
  3107.     {$IFC NOT GENERATINGCFM}
  3108.     INLINE $2F3C, $10, $17, $7000, $A82A;
  3109.     {$ENDC}
  3110. FUNCTION NASetNoteChannelState(na: NoteAllocator; noteChannel: NoteChannel; instrumentNumber: LONGINT; VAR state: LONGINT): ComponentResult;
  3111.     {$IFC NOT GENERATINGCFM}
  3112.     INLINE $2F3C, $C, $18, $7000, $A82A;
  3113.     {$ENDC}
  3114. FUNCTION NAResetNoteChannel(na: NoteAllocator; noteChannel: NoteChannel): ComponentResult;
  3115.     {$IFC NOT GENERATINGCFM}
  3116.     INLINE $2F3C, $4, $C, $7000, $A82A;
  3117.     {$ENDC}
  3118. FUNCTION NASetNoteChannelVolume(na: NoteAllocator; noteChannel: NoteChannel; volume: Fixed): ComponentResult;
  3119.     {$IFC NOT GENERATINGCFM}
  3120.     INLINE $2F3C, $8, $B, $7000, $A82A;
  3121.     {$ENDC}
  3122. FUNCTION NASetAtomicInstrument(na: NoteAllocator; noteChannel: NoteChannel; instrument: AtomicInstrumentPtr; flags: LONGINT): ComponentResult;
  3123.     {$IFC NOT GENERATINGCFM}
  3124.     INLINE $2F3C, $C, $26, $7000, $A82A;
  3125.     {$ENDC}
  3126. {
  3127.  * Control
  3128.  }
  3129. FUNCTION NAPlayNote(na: NoteAllocator; noteChannel: NoteChannel; pitch: LONGINT; velocity: LONGINT): ComponentResult;
  3130.     {$IFC NOT GENERATINGCFM}
  3131.     INLINE $2F3C, $C, $D, $7000, $A82A;
  3132.     {$ENDC}
  3133. FUNCTION NAPlayNote2(na: NoteAllocator; noteChannel: NoteChannel; pitch: LONGINT; velocity: LONGINT; offTime: TimeValue): ComponentResult;
  3134.     {$IFC NOT GENERATINGCFM}
  3135.     INLINE $2F3C, $10, $20, $7000, $A82A;
  3136.     {$ENDC}
  3137. FUNCTION NASetController(na: NoteAllocator; noteChannel: NoteChannel; controllerNumber: LONGINT; controllerValue: LONGINT): ComponentResult;
  3138.     {$IFC NOT GENERATINGCFM}
  3139.     INLINE $2F3C, $C, $E, $7000, $A82A;
  3140.     {$ENDC}
  3141. FUNCTION NASetKnob(na: NoteAllocator; noteChannel: NoteChannel; knobNumber: LONGINT; knobValue: LONGINT): ComponentResult;
  3142.     {$IFC NOT GENERATINGCFM}
  3143.     INLINE $2F3C, $C, $F, $7000, $A82A;
  3144.     {$ENDC}
  3145. FUNCTION NAFindNoteChannelTone(na: NoteAllocator; noteChannel: NoteChannel; VAR td: ToneDescription; VAR instrumentNumber: LONGINT): ComponentResult;
  3146.     {$IFC NOT GENERATINGCFM}
  3147.     INLINE $2F3C, $C, $10, $7000, $A82A;
  3148.     {$ENDC}
  3149. FUNCTION NASetInstrumentNumber(na: NoteAllocator; noteChannel: NoteChannel; instrumentNumber: LONGINT): ComponentResult;
  3150.     {$IFC NOT GENERATINGCFM}
  3151.     INLINE $2F3C, $8, $11, $7000, $A82A;
  3152.     {$ENDC}
  3153. FUNCTION NASetNoteChannelInstrument(na: NoteAllocator; noteChannel: NoteChannel; instrumentNumber: LONGINT): ComponentResult;
  3154.     {$IFC NOT GENERATINGCFM}
  3155.     INLINE $2F3C, $8, $11, $7000, $A82A;
  3156.     {$ENDC}
  3157. FUNCTION NASendMIDI(na: NoteAllocator; noteChannel: NoteChannel; VAR mp: MusicMIDIPacket): ComponentResult;
  3158.     {$IFC NOT GENERATINGCFM}
  3159.     INLINE $2F3C, $8, $23, $7000, $A82A;
  3160.     {$ENDC}
  3161. {
  3162.  * User Interface
  3163.  }
  3164. FUNCTION NAPickInstrument(na: NoteAllocator; filterProc: ModalFilterUPP; prompt: StringPtr; VAR sd: ToneDescription; flags: LONGINT; refCon: LONGINT; reserved1: LONGINT; reserved2: LONGINT): ComponentResult;
  3165.     {$IFC NOT GENERATINGCFM}
  3166.     INLINE $2F3C, $1C, $12, $7000, $A82A;
  3167.     {$ENDC}
  3168. FUNCTION NAStuffToneDescription(na: NoteAllocator; gmNumber: LONGINT; VAR td: ToneDescription): ComponentResult;
  3169.     {$IFC NOT GENERATINGCFM}
  3170.     INLINE $2F3C, $8, $1B, $7000, $A82A;
  3171.     {$ENDC}
  3172. FUNCTION NAPickArrangement(na: NoteAllocator; filterProc: ModalFilterUPP; prompt: StringPtr; partCount: LONGINT; VAR noteRequestList: NoteRequest; t: Track; songName: StringPtr): ComponentResult;
  3173.     {$IFC NOT GENERATINGCFM}
  3174.     INLINE $2F3C, $18, $13, $7000, $A82A;
  3175.     {$ENDC}
  3176. FUNCTION NACopyrightDialog(na: NoteAllocator; p: PicHandle; author: StringPtr; copyright: StringPtr; other: StringPtr; title: StringPtr; filterProc: ModalFilterUPP; refCon: LONGINT): ComponentResult;
  3177.     {$IFC NOT GENERATINGCFM}
  3178.     INLINE $2F3C, $1C, $1C, $7000, $A82A;
  3179.     {$ENDC}
  3180. FUNCTION NAPickEditInstrument(na: NoteAllocator; filterProc: ModalFilterUPP; prompt: StringPtr; refCon: LONGINT; nc: NoteChannel; ai: AtomicInstrument; flags: LONGINT): ComponentResult;
  3181.     {$IFC NOT GENERATINGCFM}
  3182.     INLINE $2F3C, $18, $24, $7000, $A82A;
  3183.     {$ENDC}
  3184. {
  3185.  * Note Allocator interior views
  3186.  }
  3187.  
  3188. TYPE
  3189.     NAStatPiece = RECORD
  3190.         clientName:                Str31;
  3191.         synthesizerName:        Str31;
  3192.         part:                    LONGINT;
  3193.         midiChannel:            LONGINT;
  3194.         polyphony:                LONGINT;
  3195.         valid:                    LONGINT;
  3196.     END;
  3197.  
  3198.     NAStat = RECORD
  3199.         pieceCount:                LONGINT;
  3200.         piece:                    ARRAY [0..63] OF NAStatPiece;
  3201.     END;
  3202.  
  3203.  
  3204. FUNCTION NAGetStatusBlock(na: NoteAllocator; VAR stat: NAStat): ComponentResult;
  3205.     {$IFC NOT GENERATINGCFM}
  3206.     INLINE $2F3C, $4, $14, $7000, $A82A;
  3207.     {$ENDC}
  3208. FUNCTION NAGetIndNoteChannel(na: NoteAllocator; index: LONGINT; VAR nc: NoteChannel): ComponentResult;
  3209.     {$IFC NOT GENERATINGCFM}
  3210.     INLINE $2F3C, $8, $1F, $7000, $A82A;
  3211.     {$ENDC}
  3212. {--------------------------
  3213.     Types
  3214. --------------------------}
  3215.  
  3216. CONST
  3217.     kTuneQueueDepth                = 8;                            { Deepest you can queue tune segments }
  3218.  
  3219.  
  3220. TYPE
  3221.     TuneStatus = RECORD
  3222.         tune:                    ^LONGINT;                                { currently playing tune }
  3223.         tunePtr:                ^LONGINT;                                { position within currently playing piece }
  3224.         time:                    TimeValue;                                { current tune time }
  3225.         queueCount:                INTEGER;                                { how many pieces queued up? }
  3226.         queueSpots:                INTEGER;                                { How many more tunepieces can be queued }
  3227.         queueTime:                TimeValue;                                { How much time is queued up? (can be very inaccurate) }
  3228.         reserved:                ARRAY [0..2] OF LONGINT;
  3229.     END;
  3230.  
  3231.  
  3232. CONST
  3233.     kStopTuneFade                = 1;                            { do a quick, synchronous fadeout }
  3234.     kStopTuneSustain            = 2;                            { don't silece notes }
  3235.     kStopTuneInstant            = 4;                            { silence notes fast (else, decay them) }
  3236.     kStopTuneReleaseChannels    = 8;                            { afterwards, let the channels go }
  3237.  
  3238.     kTuneSelect                    = 3;
  3239.     kTuneSetHeaderSelect        = 4;
  3240.     kTuneGetTimeBaseSelect        = 5;
  3241.     kTuneSetTimeScaleSelect        = 6;
  3242.     kTuneGetTimeScaleSelect        = 7;
  3243.     kTuneGetIndexedNoteChannelSelect = 8;
  3244.     kTuneDummy                    = 9;
  3245.     kTuneQueueSelect            = 10;
  3246.     kTuneInstantSelect            = 11;
  3247.     kTuneGetStatusSelect        = 12;
  3248.     kTuneStopSelect                = 13;
  3249.     kTuneResumeSelect            = 14;
  3250.     kTuneFlushSelect            = 15;
  3251.     kTuneSetVolumeSelect        = 16;
  3252.     kTuneGetVolumeSelect        = 17;
  3253.     kTunePrerollSelect            = 18;
  3254.     kTuneUnrollSelect            = 19;
  3255.     kTuneSetNoteChannelsSelect    = 20;
  3256.     kTuneSetPartTransposeSelect    = 21;
  3257.     kTuneGetStateSelect            = 22;
  3258.     kTuneLastSelector            = 23;
  3259.  
  3260. TYPE
  3261.     TuneCallBackProcPtr = ProcPtr;  { PROCEDURE TuneCallBack((CONST)VAR status: TuneStatus; refCon: LONGINT); }
  3262.     TunePlayCallBackProcPtr = ProcPtr;  { PROCEDURE TunePlayCallBack(VAR event: LONGINT; seed: LONGINT; refCon: LONGINT); }
  3263.     TuneCallBackUPP = UniversalProcPtr;
  3264.     TunePlayCallBackUPP = UniversalProcPtr;
  3265.  
  3266.     TunePlayer = ComponentInstance;
  3267.  
  3268.  
  3269. CONST
  3270.     kMaxTunePlayerParts            = 32;
  3271.     kTunePlayerType                = 'tune';
  3272.  
  3273. {--------------------------
  3274.     Prototypes
  3275. --------------------------}
  3276.  
  3277. FUNCTION TuneSetHeader(tp: TunePlayer; VAR header: LONGINT): ComponentResult;
  3278.     {$IFC NOT GENERATINGCFM}
  3279.     INLINE $2F3C, $4, $4, $7000, $A82A;
  3280.     {$ENDC}
  3281. FUNCTION TuneSetNoteChannels(tp: TunePlayer; count: LONGINT; VAR noteChannelList: NoteChannel; playCallBackProc: TunePlayCallBackUPP; refCon: LONGINT): ComponentResult;
  3282.     {$IFC NOT GENERATINGCFM}
  3283.     INLINE $2F3C, $10, $14, $7000, $A82A;
  3284.     {$ENDC}
  3285. FUNCTION TuneSetPartTranspose(tp: TunePlayer; part: LONGINT; transpose: LONGINT; velocityShift: LONGINT): ComponentResult;
  3286.     {$IFC NOT GENERATINGCFM}
  3287.     INLINE $2F3C, $C, $15, $7000, $A82A;
  3288.     {$ENDC}
  3289. FUNCTION TuneGetTimeBase(tp: TunePlayer; VAR tb: TimeBase): ComponentResult;
  3290.     {$IFC NOT GENERATINGCFM}
  3291.     INLINE $2F3C, $4, $5, $7000, $A82A;
  3292.     {$ENDC}
  3293. FUNCTION TuneSetTimeScale(tp: TunePlayer; scale: TimeScale): ComponentResult;
  3294.     {$IFC NOT GENERATINGCFM}
  3295.     INLINE $2F3C, $4, $6, $7000, $A82A;
  3296.     {$ENDC}
  3297. FUNCTION TuneGetTimeScale(tp: TunePlayer; VAR scale: TimeScale): ComponentResult;
  3298.     {$IFC NOT GENERATINGCFM}
  3299.     INLINE $2F3C, $4, $7, $7000, $A82A;
  3300.     {$ENDC}
  3301. FUNCTION TuneGetIndexedNoteChannel(tp: TunePlayer; i: LONGINT; VAR nc: NoteChannel): ComponentResult;
  3302.     {$IFC NOT GENERATINGCFM}
  3303.     INLINE $2F3C, $8, $8, $7000, $A82A;
  3304.     {$ENDC}
  3305. { Values for when to start. }
  3306.  
  3307. CONST
  3308.     kTuneStartNow                = 1;                            { start after buffer is implied }
  3309.     kTuneDontClipNotes            = 2;                            { allow notes to finish their durations outside sample }
  3310.     kTuneExcludeEdgeNotes        = 4;                            { dont play notes that start at end of tune }
  3311.     kTuneQuickStart                = 8;                            { Leave all the controllers where they are, ignore start time }
  3312.     kTuneLoopUntil                = 16;                            { loop a queued tune if there's nothing else in the queue }
  3313.     kTuneStartNewMaster            = 16384;
  3314.  
  3315.  
  3316. FUNCTION TuneQueue(tp: TunePlayer; VAR tune: LONGINT; tuneRate: Fixed; tuneStartPosition: LONGINT; tuneStopPosition: LONGINT; queueFlags: LONGINT; callBackProc: TuneCallBackUPP; refCon: LONGINT): ComponentResult;
  3317.     {$IFC NOT GENERATINGCFM}
  3318.     INLINE $2F3C, $1C, $A, $7000, $A82A;
  3319.     {$ENDC}
  3320. FUNCTION TuneInstant(tp: TunePlayer; VAR tune: LONGINT; tunePosition: LONGINT): ComponentResult;
  3321.     {$IFC NOT GENERATINGCFM}
  3322.     INLINE $2F3C, $8, $B, $7000, $A82A;
  3323.     {$ENDC}
  3324. FUNCTION TuneGetStatus(tp: TunePlayer; VAR status: TuneStatus): ComponentResult;
  3325.     {$IFC NOT GENERATINGCFM}
  3326.     INLINE $2F3C, $4, $C, $7000, $A82A;
  3327.     {$ENDC}
  3328. { Values for when to start. }
  3329.  
  3330. CONST
  3331.     kStopSustain                = 1;                            { Leaves notes playing, not silent }
  3332.     kStopFadeout                = 2;                            { Does a synchronous fade-out }
  3333.  
  3334.  
  3335. FUNCTION TuneStop(tp: TunePlayer; stopFlags: LONGINT): ComponentResult;
  3336.     {$IFC NOT GENERATINGCFM}
  3337.     INLINE $2F3C, $4, $D, $7000, $A82A;
  3338.     {$ENDC}
  3339. FUNCTION TuneResume(tp: TunePlayer): ComponentResult;
  3340.     {$IFC NOT GENERATINGCFM}
  3341.     INLINE $2F3C, 0, $E, $7000, $A82A;
  3342.     {$ENDC}
  3343. FUNCTION TuneFlush(tp: TunePlayer): ComponentResult;
  3344.     {$IFC NOT GENERATINGCFM}
  3345.     INLINE $2F3C, 0, $F, $7000, $A82A;
  3346.     {$ENDC}
  3347. FUNCTION TuneSetVolume(tp: TunePlayer; volume: Fixed): ComponentResult;
  3348.     {$IFC NOT GENERATINGCFM}
  3349.     INLINE $2F3C, $4, $10, $7000, $A82A;
  3350.     {$ENDC}
  3351. FUNCTION TuneGetVolume(tp: TunePlayer): ComponentResult;
  3352.     {$IFC NOT GENERATINGCFM}
  3353.     INLINE $2F3C, 0, $11, $7000, $A82A;
  3354.     {$ENDC}
  3355. FUNCTION TunePreroll(tp: TunePlayer): ComponentResult;
  3356.     {$IFC NOT GENERATINGCFM}
  3357.     INLINE $2F3C, 0, $12, $7000, $A82A;
  3358.     {$ENDC}
  3359. FUNCTION TuneUnroll(tp: TunePlayer): ComponentResult;
  3360.     {$IFC NOT GENERATINGCFM}
  3361.     INLINE $2F3C, 0, $13, $7000, $A82A;
  3362.     {$ENDC}
  3363. FUNCTION TuneGetState(tp: TunePlayer; t: TimeValue; VAR state: Handle): ComponentResult;
  3364.     {$IFC NOT GENERATINGCFM}
  3365.     INLINE $2F3C, $8, $16, $7000, $A82A;
  3366.     {$ENDC}
  3367.     
  3368. TYPE
  3369.     MusicOpWord = LONGINT;
  3370.     MusicOpWordPtr = ^LONGINT;
  3371.  
  3372. {     QuickTime Music Track Event Formats:
  3373.  
  3374.     At this time, QuickTime music tracks support 5 different event types -- REST events,
  3375.     short NOTE events, short CONTROL events, short GENERAL events, Long NOTE events, 
  3376.     long CONTROL events, and variable GENERAL events.
  3377.  
  3378.         • REST Event (4 bytes/event):
  3379.     
  3380.             (0 0 0) (5-bit UNUSED) (24-bit Rest Duration)
  3381.         
  3382.         • Short NOTE Events (4 bytes/event):
  3383.     
  3384.             (0 0 1) (5-bit Part) (6-bit Pitch) (7-bit Volume) (11-bit Duration)
  3385.         
  3386.             where:    Pitch is offset by 32 (Actual pitch = pitch field + 32)
  3387.  
  3388.         • Short CONTROL Events (4 bytes/event):
  3389.     
  3390.             (0 1 0) (5-bit Part) (8-bit Controller) (1-bit UNUSED) (1-bit Sign) (7-bit MSB) (7-bit LSB)
  3391.                                                                          ( or 15-bit Signed Value)
  3392.         • Short GENERAL Event (4 bytes/event):
  3393.     
  3394.             (0 1 1) (1-bit UNUSED) (12-bit Sub-Type) (16-bit Value)
  3395.     
  3396.         • Long NOTE Events (8 bytes/event):
  3397.     
  3398.             (1 0 0 1) (12-bit Part) (1-bit UNUSED) (7-bit Pitch) (1-bit UNUSED) (7-bit Volume)
  3399.             (1 0) (8-bit UNUSED) (22-bit Duration)
  3400.         
  3401.         • Long CONTROL Event (8 bytes/event):
  3402.         
  3403.             (1 0 1 0) (12-bit Part) (16-bit Value MSB) 
  3404.             (1 0) (14-bit Controller) (16-bit Value LSB)
  3405.     
  3406.         • Long KNOB Event (8 bytes/event):
  3407.     
  3408.             (1 0 1 1) (12-bit Sub-Type) (16-bit Value MSB)
  3409.             (1 0) (14-bit KNOB) (16-bit Value LSB)
  3410.     
  3411.         • Variable GENERAL Length Events (N bytes/event):
  3412.     
  3413.             (1 1 1 1) (12-bit Sub-Type) (16-bit Length)
  3414.                 :
  3415.             (32-bit Data values)
  3416.                 :
  3417.             (1 1) (14-bit UNUSED) (16-bit Length)
  3418.     
  3419.             where:    Length field is the number of LONG words in the record.
  3420.                     Lengths include the first and last long words (Minimum length = 2)
  3421.                 
  3422.     The following event type values have not been used yet and are reserved for 
  3423.     future expansion:
  3424.         
  3425.         • (1 0 0 0)        (8 bytes/event)
  3426.         • (1 1 0 0)        (N bytes/event)
  3427.         • (1 1 0 1)        (N bytes/event)
  3428.         • (1 1 1 0)        (N bytes/event)
  3429.         
  3430.     For all events, the following generalizations apply:
  3431.     
  3432.         -    All duration values are specified in Millisecond units.
  3433.         -     Pitch values are intended to map directly to the MIDI key numbers.
  3434.         -    Controllers from 0 to 127 correspond to the standard MIDI controllers.
  3435.             Controllers greater than 127 correspond to other controls (i.e., Pitch Bend, 
  3436.             Key Pressure, and Channel Pressure).    
  3437. }
  3438. { Defines for the implemented music event data fields}
  3439.  
  3440. CONST
  3441.     kRestEventType                = $0;                            { lower 3-bits }
  3442.     kNoteEventType                = $1;                            { lower 3-bits }
  3443.     kControlEventType            = $2;                            { lower 3-bits }
  3444.     kMarkerEventType            = $3;                            { lower 3-bits }
  3445.     kUndefined1EventType        = $8;                            { 4-bits }
  3446.     kXNoteEventType                = $9;                            { 4-bits }
  3447.     kXControlEventType            = $A;                            { 4-bits }
  3448.     kKnobEventType                = $B;                            { 4-bits }
  3449.     kUndefined2EventType        = $C;                            { 4-bits }
  3450.     kUndefined3EventType        = $D;                            { 4-bits }
  3451.     kUndefined4EventType        = $E;                            { 4-bits }
  3452.     kGeneralEventType            = $F;                            { 4-bits }
  3453.     kXEventLengthBits            = $2;                            { 2 bits: indicates 8-byte event record }
  3454.     kGeneralEventLengthBits        = $3;                            { 2 bits: indicates variable length event record }
  3455.     kEventLen                    = 1;                            { length of events in long words }
  3456.     kXEventLen                    = 2;
  3457.     kRestEventLen                = kEventLen;                    { length of events in long words }
  3458.     kNoteEventLen                = kEventLen;
  3459.     kControlEventLen            = kEventLen;
  3460.     kMarkerEventLen                = kEventLen;
  3461.     kXNoteEventLen                = kXEventLen;
  3462.     kXControlEventLen            = kXEventLen;
  3463.     kGeneralEventLen            = kXEventLen;                    { 2 or more, however }
  3464. { Universal Event Defines}
  3465.     kEventLengthFieldPos        = 30;                            { by looking at these two bits of the 1st or last word              }
  3466.     kEventLengthFieldWidth        = 2;                            { of an event you can determine the event length                      }
  3467. { length field: 0 & 1 => 1 long; 2 => 2 longs; 3 => variable length }
  3468.     kEventTypeFieldPos            = 29;                            { event type field for short events }
  3469.     kEventTypeFieldWidth        = 3;                            { short type is 3 bits }
  3470.     kXEventTypeFieldPos            = 28;                            { event type field for extended events }
  3471.     kXEventTypeFieldWidth        = 4;                            { extended type is 4 bits }
  3472.     kEventPartFieldPos            = 24;
  3473.     kEventPartFieldWidth        = 5;
  3474.     kXEventPartFieldPos            = 16;                            { in the 1st long word }
  3475.     kXEventPartFieldWidth        = 12;
  3476. { Rest Events}
  3477.     kRestEventDurationFieldPos    = 0;
  3478.     kRestEventDurationFieldWidth = 24;
  3479.     kRestEventDurationMax        = 0+((1 * (2**(kRestEventDurationFieldWidth))) - 1);
  3480. { Note Events}
  3481.     kNoteEventPitchFieldPos        = 18;
  3482.     kNoteEventPitchFieldWidth    = 6;
  3483.     kNoteEventPitchOffset        = 32;                            { add to value in pitch field to get actual pitch }
  3484.     kNoteEventVolumeFieldPos    = 11;
  3485.     kNoteEventVolumeFieldWidth    = 7;
  3486.     kNoteEventVolumeOffset        = 0;                            { add to value in volume field to get actual volume }
  3487.     kNoteEventDurationFieldPos    = 0;
  3488.     kNoteEventDurationFieldWidth = 11;
  3489.     kNoteEventDurationMax        = 0+((1 * (2**(kNoteEventDurationFieldWidth))) - 1);
  3490.     kXNoteEventPitchFieldPos    = 0;                            { in the 1st long word }
  3491.     kXNoteEventPitchFieldWidth    = 16;
  3492.     kXNoteEventDurationFieldPos    = 0;                            { in the 2nd long word }
  3493.     kXNoteEventDurationFieldWidth = 22;
  3494.     kXNoteEventDurationMax        = 0+((1 * (2**(kXNoteEventDurationFieldWidth))) - 1);
  3495.     kXNoteEventVolumeFieldPos    = 22;                            { in the 2nd long word }
  3496.     kXNoteEventVolumeFieldWidth    = 7;
  3497. { Control Events}
  3498.     kControlEventControllerFieldPos = 16;
  3499.     kControlEventControllerFieldWidth = 8;
  3500.     kControlEventValueFieldPos    = 0;
  3501.     kControlEventValueFieldWidth = 16;
  3502.     kXControlEventControllerFieldPos = 0;                        { in the 2nd long word }
  3503.     kXControlEventControllerFieldWidth = 16;
  3504.     kXControlEventValueFieldPos    = 0;                            { in the 1st long word }
  3505.     kXControlEventValueFieldWidth = 16;
  3506. { Knob Events}
  3507.     kKnobEventValueHighFieldPos    = 0;                            { 1st long word }
  3508.     kKnobEventValueHighFieldWidth = 16;
  3509.     kKnobEventKnobFieldPos        = 16;                            { 2nd long word }
  3510.     kKnobEventKnobFieldWidth    = 14;
  3511.     kKnobEventValueLowFieldPos    = 0;                            { 2nd long word }
  3512.     kKnobEventValueLowFieldWidth = 16;
  3513. { Marker Events}
  3514.     kMarkerEventSubtypeFieldPos    = 16;
  3515.     kMarkerEventSubtypeFieldWidth = 8;
  3516.     kMarkerEventValueFieldPos    = 0;
  3517.     kMarkerEventValueFieldWidth    = 16;
  3518. { General Events}
  3519.     kGeneralEventSubtypeFieldPos = 16;                            { in the last long word }
  3520.     kGeneralEventSubtypeFieldWidth = 14;
  3521.     kGeneralEventLengthFieldPos    = 0;                            { in the 1st & last long words }
  3522.     kGeneralEventLengthFieldWidth = 16;
  3523.  
  3524.     kGeneralEventNoteRequest    = 1;                            { Encapsulates NoteRequest data structure }
  3525.     kGeneralEventInstrument        = 2;                            { Encapsulates poly, typical poly, followed by InstrumentData record }
  3526.     kGeneralEventFlatInstrument    = 3;                            { Encapsulates poly, typical poly, followed by FlatInstrument record }
  3527.     kGeneralEventPartKey        = 4;
  3528.     kGeneralEventTuneDifference    = 5;                            { Contains a standard sequence, with end marker, for the tune difference of a sequence piece }
  3529.     kGeneralEventAtomicInstrument = 6;                            { Encapsulates AtomicInstrument record }
  3530.  
  3531.     TCSourceRefNameType            = 'name';
  3532.  
  3533.     tcDropFrame                    = 1 * (2**(0));
  3534.     tc24HourMax                    = 1 * (2**(1));
  3535.     tcNegTimesOK                = 1 * (2**(2));
  3536.     tcCounter                    = 1 * (2**(3));
  3537.  
  3538.  
  3539. TYPE
  3540.     TimeCodeDef = RECORD
  3541.         flags:                    LONGINT;                                { drop-frame, etc.}
  3542.         fTimeScale:                TimeScale;                                { time scale of frameDuration (eg. 2997)}
  3543.         frameDuration:            TimeValue;                                { duration of each frame (eg. 100)}
  3544.         numFrames:                SInt8;                                    { frames/sec for timecode (eg. 30) OR frames/tick for counter mode}
  3545.         padding:                SInt8;                                    { unused padding byte}
  3546.     END;
  3547.  
  3548.  
  3549. CONST
  3550.     tctNegFlag                    = $80;                            { negative bit is in minutes}
  3551.  
  3552.  
  3553. TYPE
  3554.     TimeCodeTime = RECORD
  3555.         hours:                    SInt8;
  3556.         minutes:                SInt8;
  3557.         seconds:                SInt8;
  3558.         frames:                    SInt8;
  3559.     END;
  3560.  
  3561.     TimeCodeCounter = RECORD
  3562.         counter:                LONGINT;
  3563.     END;
  3564.  
  3565.     TimeCodeRecord = RECORD
  3566.         CASE INTEGER OF
  3567.         0: (
  3568.             t:                            TimeCodeTime;
  3569.            );
  3570.         1: (
  3571.             c:                            TimeCodeCounter;
  3572.            );
  3573.     END;
  3574.  
  3575.     TimeCodeDescription = RECORD
  3576.         descSize:                LONGINT;                                { standard sample description header}
  3577.         dataFormat:                LONGINT;
  3578.         resvd1:                    LONGINT;
  3579.         resvd2:                    INTEGER;
  3580.         dataRefIndex:            INTEGER;
  3581.         flags:                    LONGINT;                                { timecode specific stuff}
  3582.         timeCodeDef:            TimeCodeDef;
  3583.         srcRef:                    ARRAY [0..0] OF LONGINT;
  3584.     END;
  3585.  
  3586.     TimeCodeDescriptionPtr = ^TimeCodeDescription;
  3587.  
  3588.     TimeCodeDescriptionHandle = ^TimeCodeDescriptionPtr;
  3589.  
  3590.  
  3591. CONST
  3592.     tcdfShowTimeCode            = 1 * (2**(0));
  3593.  
  3594.     kTCGetCurrentTimeCodeSelect    = 257;
  3595.     kTCGetTimeCodeAtTimeSelect    = 258;
  3596.     kTCTimeCodeToStringSelect    = 259;
  3597.     kTCTimeCodeToFrameNumberSelect = 260;
  3598.     kTCFrameNumberToTimeCodeSelect = 261;
  3599.     kTCGetSourceRefSelect        = 262;
  3600.     kTCSetSourceRefSelect        = 263;
  3601.     kTCSetTimeCodeFlagsSelect    = 264;
  3602.     kTCGetTimeCodeFlagsSelect    = 265;
  3603.     kTCSetDisplayOptionsSelect    = 266;
  3604.     kTCGetDisplayOptionsSelect    = 267;
  3605.  
  3606.  
  3607. TYPE
  3608.     TCTextOptions = RECORD
  3609.         txFont:                    INTEGER;
  3610.         txFace:                    INTEGER;
  3611.         txSize:                    INTEGER;
  3612.         foreColor:                RGBColor;
  3613.         backColor:                RGBColor;
  3614.     END;
  3615.  
  3616.     TCTextOptionsPtr = ^TCTextOptions;
  3617.  
  3618.  
  3619. FUNCTION TCGetCurrentTimeCode(mh: MediaHandler; VAR frameNum: LONGINT; VAR tcdef: TimeCodeDef; VAR tcrec: TimeCodeRecord; VAR srcRefH: UserData): HandlerError;
  3620.     {$IFC NOT GENERATINGCFM}
  3621.     INLINE $2F3C, $10, $101, $7000, $A82A;
  3622.     {$ENDC}
  3623. FUNCTION TCGetTimeCodeAtTime(mh: MediaHandler; mediaTime: TimeValue; VAR frameNum: LONGINT; VAR tcdef: TimeCodeDef; VAR tcdata: TimeCodeRecord; VAR srcRefH: UserData): HandlerError;
  3624.     {$IFC NOT GENERATINGCFM}
  3625.     INLINE $2F3C, $14, $102, $7000, $A82A;
  3626.     {$ENDC}
  3627. FUNCTION TCTimeCodeToFrameNumber(mh: MediaHandler; VAR tcdef: TimeCodeDef; VAR tcrec: TimeCodeRecord; VAR frameNumber: LONGINT): HandlerError;
  3628.     {$IFC NOT GENERATINGCFM}
  3629.     INLINE $2F3C, $C, $104, $7000, $A82A;
  3630.     {$ENDC}
  3631. FUNCTION TCFrameNumberToTimeCode(mh: MediaHandler; frameNumber: LONGINT; VAR tcdef: TimeCodeDef; VAR tcrec: TimeCodeRecord): HandlerError;
  3632.     {$IFC NOT GENERATINGCFM}
  3633.     INLINE $2F3C, $C, $105, $7000, $A82A;
  3634.     {$ENDC}
  3635. FUNCTION TCTimeCodeToString(mh: MediaHandler; VAR tcdef: TimeCodeDef; VAR tcrec: TimeCodeRecord; tcStr: StringPtr): HandlerError;
  3636.     {$IFC NOT GENERATINGCFM}
  3637.     INLINE $2F3C, $C, $103, $7000, $A82A;
  3638.     {$ENDC}
  3639. FUNCTION TCGetSourceRef(mh: MediaHandler; tcdH: TimeCodeDescriptionHandle; VAR srefH: UserData): HandlerError;
  3640.     {$IFC NOT GENERATINGCFM}
  3641.     INLINE $2F3C, $8, $106, $7000, $A82A;
  3642.     {$ENDC}
  3643. FUNCTION TCSetSourceRef(mh: MediaHandler; tcdH: TimeCodeDescriptionHandle; srefH: UserData): HandlerError;
  3644.     {$IFC NOT GENERATINGCFM}
  3645.     INLINE $2F3C, $8, $107, $7000, $A82A;
  3646.     {$ENDC}
  3647. FUNCTION TCSetTimeCodeFlags(mh: MediaHandler; flags: LONGINT; flagsMask: LONGINT): HandlerError;
  3648.     {$IFC NOT GENERATINGCFM}
  3649.     INLINE $2F3C, $8, $108, $7000, $A82A;
  3650.     {$ENDC}
  3651. FUNCTION TCGetTimeCodeFlags(mh: MediaHandler; VAR flags: LONGINT): HandlerError;
  3652.     {$IFC NOT GENERATINGCFM}
  3653.     INLINE $2F3C, $4, $109, $7000, $A82A;
  3654.     {$ENDC}
  3655. FUNCTION TCSetDisplayOptions(mh: MediaHandler; textOptions: TCTextOptionsPtr): HandlerError;
  3656.     {$IFC NOT GENERATINGCFM}
  3657.     INLINE $2F3C, $4, $10A, $7000, $A82A;
  3658.     {$ENDC}
  3659. FUNCTION TCGetDisplayOptions(mh: MediaHandler; textOptions: TCTextOptionsPtr): HandlerError;
  3660.     {$IFC NOT GENERATINGCFM}
  3661.     INLINE $2F3C, $4, $10B, $7000, $A82A;
  3662.     {$ENDC}
  3663. { UPP call backs }
  3664.  
  3665. CONST
  3666.     uppSGDataProcInfo = $003BFFE0; { FUNCTION (4 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param, 2 byte param, 4 byte param): 2 byte result; }
  3667.     uppSGModalFilterProcInfo = $00003FD0; { FUNCTION (4 byte param, 4 byte param, 4 byte param, 4 byte param): 1 byte result; }
  3668.     uppSGGrabProcInfo = $00000EF0; { FUNCTION (4 byte param, 2 byte param, 4 byte param): 4 byte result; }
  3669.     uppSGGrabCompleteProcInfo = $00003EF0; { FUNCTION (4 byte param, 2 byte param, 4 byte param, 4 byte param): 4 byte result; }
  3670.     uppSGDisplayProcInfo = $0000FEF0; { FUNCTION (4 byte param, 2 byte param, 4 byte param, 4 byte param, 4 byte param): 4 byte result; }
  3671.     uppSGCompressProcInfo = $00000EF0; { FUNCTION (4 byte param, 2 byte param, 4 byte param): 4 byte result; }
  3672.     uppSGCompressCompleteProcInfo = $0000FEF0; { FUNCTION (4 byte param, 2 byte param, 4 byte param, 4 byte param, 4 byte param): 4 byte result; }
  3673.     uppSGAddFrameProcInfo = $0003FEF0; { FUNCTION (4 byte param, 2 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param): 4 byte result; }
  3674.     uppSGTransferFrameProcInfo = $0000FEF0; { FUNCTION (4 byte param, 2 byte param, 4 byte param, 4 byte param, 4 byte param): 4 byte result; }
  3675.     uppSGGrabCompressCompleteProcInfo = $0000FFF0; { FUNCTION (4 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param): 4 byte result; }
  3676.     uppSGDisplayCompressProcInfo = $0003FFF0; { FUNCTION (4 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param): 4 byte result; }
  3677.     uppVdigIntProcInfo = $000003C0; { PROCEDURE (4 byte param, 4 byte param); }
  3678.     uppSCModalFilterProcInfo = $00003FD0; { FUNCTION (4 byte param, 4 byte param, 4 byte param, 4 byte param): 1 byte result; }
  3679.     uppSCModalHookProcInfo = $00003EE0; { FUNCTION (4 byte param, 2 byte param, 4 byte param, 4 byte param): 2 byte result; }
  3680.     uppDataHCompletionProcInfo = $00000BC0; { PROCEDURE (4 byte param, 4 byte param, 2 byte param); }
  3681.     uppMusicMIDISendProcInfo = $00000FF0; { FUNCTION (4 byte param, 4 byte param, 4 byte param): 4 byte result; }
  3682.     uppMusicMIDIReadHookProcInfo = $000003F0; { FUNCTION (4 byte param, 4 byte param): 4 byte result; }
  3683.     uppMusicOfflineDataProcInfo = $00000FF0; { FUNCTION (4 byte param, 4 byte param, 4 byte param): 4 byte result; }
  3684.     uppTuneCallBackProcInfo = $000003C0; { PROCEDURE (4 byte param, 4 byte param); }
  3685.     uppTunePlayCallBackProcInfo = $00000FC0; { PROCEDURE (4 byte param, 4 byte param, 4 byte param); }
  3686.  
  3687. FUNCTION NewSGDataProc(userRoutine: SGDataProcPtr): SGDataUPP;
  3688.     {$IFC NOT GENERATINGCFM }
  3689.     INLINE $2E9F;
  3690.     {$ENDC}
  3691.  
  3692. FUNCTION NewSGModalFilterProc(userRoutine: SGModalFilterProcPtr): SGModalFilterUPP;
  3693.     {$IFC NOT GENERATINGCFM }
  3694.     INLINE $2E9F;
  3695.     {$ENDC}
  3696.  
  3697. FUNCTION NewSGGrabProc(userRoutine: SGGrabProcPtr): SGGrabUPP;
  3698.     {$IFC NOT GENERATINGCFM }
  3699.     INLINE $2E9F;
  3700.     {$ENDC}
  3701.  
  3702. FUNCTION NewSGGrabCompleteProc(userRoutine: SGGrabCompleteProcPtr): SGGrabCompleteUPP;
  3703.     {$IFC NOT GENERATINGCFM }
  3704.     INLINE $2E9F;
  3705.     {$ENDC}
  3706.  
  3707. FUNCTION NewSGDisplayProc(userRoutine: SGDisplayProcPtr): SGDisplayUPP;
  3708.     {$IFC NOT GENERATINGCFM }
  3709.     INLINE $2E9F;
  3710.     {$ENDC}
  3711.  
  3712. FUNCTION NewSGCompressProc(userRoutine: SGCompressProcPtr): SGCompressUPP;
  3713.     {$IFC NOT GENERATINGCFM }
  3714.     INLINE $2E9F;
  3715.     {$ENDC}
  3716.  
  3717. FUNCTION NewSGCompressCompleteProc(userRoutine: SGCompressCompleteProcPtr): SGCompressCompleteUPP;
  3718.     {$IFC NOT GENERATINGCFM }
  3719.     INLINE $2E9F;
  3720.     {$ENDC}
  3721.  
  3722. FUNCTION NewSGAddFrameProc(userRoutine: SGAddFrameProcPtr): SGAddFrameUPP;
  3723.     {$IFC NOT GENERATINGCFM }
  3724.     INLINE $2E9F;
  3725.     {$ENDC}
  3726.  
  3727. FUNCTION NewSGTransferFrameProc(userRoutine: SGTransferFrameProcPtr): SGTransferFrameUPP;
  3728.     {$IFC NOT GENERATINGCFM }
  3729.     INLINE $2E9F;
  3730.     {$ENDC}
  3731.  
  3732. FUNCTION NewSGGrabCompressCompleteProc(userRoutine: SGGrabCompressCompleteProcPtr): SGGrabCompressCompleteUPP;
  3733.     {$IFC NOT GENERATINGCFM }
  3734.     INLINE $2E9F;
  3735.     {$ENDC}
  3736.  
  3737. FUNCTION NewSGDisplayCompressProc(userRoutine: SGDisplayCompressProcPtr): SGDisplayCompressUPP;
  3738.     {$IFC NOT GENERATINGCFM }
  3739.     INLINE $2E9F;
  3740.     {$ENDC}
  3741.  
  3742. FUNCTION NewVdigIntProc(userRoutine: VdigIntProcPtr): VdigIntUPP;
  3743.     {$IFC NOT GENERATINGCFM }
  3744.     INLINE $2E9F;
  3745.     {$ENDC}
  3746.  
  3747. FUNCTION NewSCModalFilterProc(userRoutine: SCModalFilterProcPtr): SCModalFilterUPP;
  3748.     {$IFC NOT GENERATINGCFM }
  3749.     INLINE $2E9F;
  3750.     {$ENDC}
  3751.  
  3752. FUNCTION NewSCModalHookProc(userRoutine: SCModalHookProcPtr): SCModalHookUPP;
  3753.     {$IFC NOT GENERATINGCFM }
  3754.     INLINE $2E9F;
  3755.     {$ENDC}
  3756.  
  3757. FUNCTION NewDataHCompletionProc(userRoutine: DataHCompletionProcPtr): DataHCompletionUPP;
  3758.     {$IFC NOT GENERATINGCFM }
  3759.     INLINE $2E9F;
  3760.     {$ENDC}
  3761.  
  3762. FUNCTION NewMusicMIDISendProc(userRoutine: MusicMIDISendProcPtr): MusicMIDISendUPP;
  3763.     {$IFC NOT GENERATINGCFM }
  3764.     INLINE $2E9F;
  3765.     {$ENDC}
  3766.  
  3767. FUNCTION NewMusicMIDIReadHookProc(userRoutine: MusicMIDIReadHookProcPtr): MusicMIDIReadHookUPP;
  3768.     {$IFC NOT GENERATINGCFM }
  3769.     INLINE $2E9F;
  3770.     {$ENDC}
  3771.  
  3772. FUNCTION NewMusicOfflineDataProc(userRoutine: MusicOfflineDataProcPtr): MusicOfflineDataUPP;
  3773.     {$IFC NOT GENERATINGCFM }
  3774.     INLINE $2E9F;
  3775.     {$ENDC}
  3776.  
  3777. FUNCTION NewTuneCallBackProc(userRoutine: TuneCallBackProcPtr): TuneCallBackUPP;
  3778.     {$IFC NOT GENERATINGCFM }
  3779.     INLINE $2E9F;
  3780.     {$ENDC}
  3781.  
  3782. FUNCTION NewTunePlayCallBackProc(userRoutine: TunePlayCallBackProcPtr): TunePlayCallBackUPP;
  3783.     {$IFC NOT GENERATINGCFM }
  3784.     INLINE $2E9F;
  3785.     {$ENDC}
  3786.  
  3787. FUNCTION CallSGDataProc(c: SGChannel; p: Ptr; len: LONGINT; VAR offset: LONGINT; chRefCon: LONGINT; time: TimeValue; writeType: INTEGER; refCon: LONGINT; userRoutine: SGDataUPP): OSErr;
  3788.     {$IFC NOT GENERATINGCFM}
  3789.     INLINE $205F, $4E90;
  3790.     {$ENDC}
  3791.  
  3792. FUNCTION CallSGModalFilterProc(theDialog: DialogPtr; VAR theEvent: EventRecord; VAR itemHit: INTEGER; refCon: LONGINT; userRoutine: SGModalFilterUPP): BOOLEAN;
  3793.     {$IFC NOT GENERATINGCFM}
  3794.     INLINE $205F, $4E90;
  3795.     {$ENDC}
  3796.  
  3797. FUNCTION CallSGGrabProc(c: SGChannel; bufferNum: INTEGER; refCon: LONGINT; userRoutine: SGGrabUPP): ComponentResult;
  3798.     {$IFC NOT GENERATINGCFM}
  3799.     INLINE $205F, $4E90;
  3800.     {$ENDC}
  3801.  
  3802. FUNCTION CallSGGrabCompleteProc(c: SGChannel; bufferNum: INTEGER; VAR done: BOOLEAN; refCon: LONGINT; userRoutine: SGGrabCompleteUPP): ComponentResult;
  3803.     {$IFC NOT GENERATINGCFM}
  3804.     INLINE $205F, $4E90;
  3805.     {$ENDC}
  3806.  
  3807. FUNCTION CallSGDisplayProc(c: SGChannel; bufferNum: INTEGER; VAR mp: MatrixRecord; clipRgn: RgnHandle; refCon: LONGINT; userRoutine: SGDisplayUPP): ComponentResult;
  3808.     {$IFC NOT GENERATINGCFM}
  3809.     INLINE $205F, $4E90;
  3810.     {$ENDC}
  3811.  
  3812. FUNCTION CallSGCompressProc(c: SGChannel; bufferNum: INTEGER; refCon: LONGINT; userRoutine: SGCompressUPP): ComponentResult;
  3813.     {$IFC NOT GENERATINGCFM}
  3814.     INLINE $205F, $4E90;
  3815.     {$ENDC}
  3816.  
  3817. FUNCTION CallSGCompressCompleteProc(c: SGChannel; bufferNum: INTEGER; VAR done: BOOLEAN; VAR ci: SGCompressInfo; refCon: LONGINT; userRoutine: SGCompressCompleteUPP): ComponentResult;
  3818.     {$IFC NOT GENERATINGCFM}
  3819.     INLINE $205F, $4E90;
  3820.     {$ENDC}
  3821.  
  3822. FUNCTION CallSGAddFrameProc(c: SGChannel; bufferNum: INTEGER; atTime: TimeValue; scale: TimeScale; {CONST}VAR ci: SGCompressInfo; refCon: LONGINT; userRoutine: SGAddFrameUPP): ComponentResult;
  3823.     {$IFC NOT GENERATINGCFM}
  3824.     INLINE $205F, $4E90;
  3825.     {$ENDC}
  3826.  
  3827. FUNCTION CallSGTransferFrameProc(c: SGChannel; bufferNum: INTEGER; VAR mp: MatrixRecord; clipRgn: RgnHandle; refCon: LONGINT; userRoutine: SGTransferFrameUPP): ComponentResult;
  3828.     {$IFC NOT GENERATINGCFM}
  3829.     INLINE $205F, $4E90;
  3830.     {$ENDC}
  3831.  
  3832. FUNCTION CallSGGrabCompressCompleteProc(c: SGChannel; VAR done: BOOLEAN; VAR ci: SGCompressInfo; VAR t: TimeRecord; refCon: LONGINT; userRoutine: SGGrabCompressCompleteUPP): ComponentResult;
  3833.     {$IFC NOT GENERATINGCFM}
  3834.     INLINE $205F, $4E90;
  3835.     {$ENDC}
  3836.  
  3837. FUNCTION CallSGDisplayCompressProc(c: SGChannel; dataPtr: Ptr; desc: ImageDescriptionHandle; VAR mp: MatrixRecord; clipRgn: RgnHandle; refCon: LONGINT; userRoutine: SGDisplayCompressUPP): ComponentResult;
  3838.     {$IFC NOT GENERATINGCFM}
  3839.     INLINE $205F, $4E90;
  3840.     {$ENDC}
  3841.  
  3842. PROCEDURE CallVdigIntProc(flags: LONGINT; refcon: LONGINT; userRoutine: VdigIntUPP);
  3843.     {$IFC NOT GENERATINGCFM}
  3844.     INLINE $205F, $4E90;
  3845.     {$ENDC}
  3846.  
  3847. FUNCTION CallSCModalFilterProc(theDialog: DialogPtr; VAR theEvent: EventRecord; VAR itemHit: INTEGER; refcon: LONGINT; userRoutine: SCModalFilterUPP): BOOLEAN;
  3848.     {$IFC NOT GENERATINGCFM}
  3849.     INLINE $205F, $4E90;
  3850.     {$ENDC}
  3851.  
  3852. FUNCTION CallSCModalHookProc(theDialog: DialogPtr; itemHit: INTEGER; params: UNIV Ptr; refcon: LONGINT; userRoutine: SCModalHookUPP): INTEGER;
  3853.     {$IFC NOT GENERATINGCFM}
  3854.     INLINE $205F, $4E90;
  3855.     {$ENDC}
  3856.  
  3857. PROCEDURE CallDataHCompletionProc(request: Ptr; refcon: LONGINT; err: OSErr; userRoutine: DataHCompletionUPP);
  3858.     {$IFC NOT GENERATINGCFM}
  3859.     INLINE $205F, $4E90;
  3860.     {$ENDC}
  3861.  
  3862. FUNCTION CallMusicMIDISendProc(self: MusicComponent; refCon: LONGINT; VAR mmp: MusicMIDIPacket; userRoutine: MusicMIDISendUPP): ComponentResult;
  3863.     {$IFC NOT GENERATINGCFM}
  3864.     INLINE $205F, $4E90;
  3865.     {$ENDC}
  3866.  
  3867. FUNCTION CallMusicMIDIReadHookProc(VAR mp: MusicMIDIPacket; myRefCon: LONGINT; userRoutine: MusicMIDIReadHookUPP): ComponentResult;
  3868.     {$IFC NOT GENERATINGCFM}
  3869.     INLINE $205F, $4E90;
  3870.     {$ENDC}
  3871.  
  3872. FUNCTION CallMusicOfflineDataProc(SoundData: Ptr; numBytes: LONGINT; myRefCon: LONGINT; userRoutine: MusicOfflineDataUPP): ComponentResult;
  3873.     {$IFC NOT GENERATINGCFM}
  3874.     INLINE $205F, $4E90;
  3875.     {$ENDC}
  3876.  
  3877. PROCEDURE CallTuneCallBackProc({CONST}VAR status: TuneStatus; refCon: LONGINT; userRoutine: TuneCallBackUPP);
  3878.     {$IFC NOT GENERATINGCFM}
  3879.     INLINE $205F, $4E90;
  3880.     {$ENDC}
  3881.  
  3882. PROCEDURE CallTunePlayCallBackProc(VAR event: LONGINT; seed: LONGINT; refCon: LONGINT; userRoutine: TunePlayCallBackUPP);
  3883.     {$IFC NOT GENERATINGCFM}
  3884.     INLINE $205F, $4E90;
  3885.     {$ENDC}
  3886.  
  3887. {$ALIGN RESET}
  3888. {$POP}
  3889.  
  3890. {$SETC UsingIncludes := QuickTimeComponentsIncludes}
  3891.  
  3892. {$ENDC} {__QUICKTIMECOMPONENTS__}
  3893.  
  3894. {$IFC NOT UsingIncludes}
  3895.  END.
  3896. {$ENDC}
  3897.